Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1816)

Unified Diff: base/file_path.cc

Issue 204043: Set OS X cache directory to ~/Library/Caches/[app name]/[profile name] ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/file_path.h ('k') | base/file_path_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_path.cc
===================================================================
--- base/file_path.cc (revision 26368)
+++ base/file_path.cc (working copy)
@@ -159,6 +159,11 @@
}
bool FilePath::IsParent(const FilePath& child) const {
+ return AppendRelativePath(child, NULL);
+}
+
+bool FilePath::AppendRelativePath(const FilePath& child,
+ FilePath* path) const {
std::vector<FilePath::StringType> parent_components;
std::vector<FilePath::StringType> child_components;
GetComponents(&parent_components);
@@ -194,6 +199,11 @@
++child_comp;
}
+ if (path != NULL) {
+ for (; child_comp != child_components.end(); ++child_comp) {
+ *path = path->Append(*child_comp);
+ }
+ }
return true;
}
« no previous file with comments | « base/file_path.h ('k') | base/file_path_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698