(Auto)update libjingle 67043374-> 67044055

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6163 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org
2014-05-14 21:35:19 +00:00
parent 3e924683d4
commit ef5a752c29
4 changed files with 27 additions and 34 deletions

View File

@@ -45,6 +45,7 @@
#include "talk/base/common.h"
#include "talk/base/gunit.h"
#include "talk/base/nethelpers.h"
#include "talk/base/pathutils.h"
#include "talk/base/stream.h"
#include "talk/base/stringencode.h"
#include "talk/base/stringutils.h"
@@ -451,6 +452,30 @@ inline bool ReadFile(const char* filename, std::string* contents) {
return success;
}
// Look in parent dir for parallel directory.
inline talk_base::Pathname GetSiblingDirectory(
const std::string& parallel_dir) {
talk_base::Pathname path = talk_base::Filesystem::GetCurrentDirectory();
while (!path.empty()) {
talk_base::Pathname potential_parallel_dir = path;
potential_parallel_dir.AppendFolder(parallel_dir);
if (talk_base::Filesystem::IsFolder(potential_parallel_dir)) {
return potential_parallel_dir;
}
path.SetFolder(path.parent_folder());
}
return path;
}
inline talk_base::Pathname GetGoogle3Directory() {
return GetSiblingDirectory("google3");
}
inline talk_base::Pathname GetTalkDirectory() {
return GetSiblingDirectory("talk");
}
///////////////////////////////////////////////////////////////////////////////
// Unittest predicates which are similar to STREQ, but for raw memory
///////////////////////////////////////////////////////////////////////////////