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

Unified Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_util.h

Issue 374843002: [SyncFS] [Refactoring] Change RemovePrefix() to return bool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/drive_backend_util.h
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_backend_util.h b/chrome/browser/sync_file_system/drive_backend/drive_backend_util.h
index 977fa5007f23530a75eac64a93f4a73044bf6f16..d5e662576b61c7ded09e8aca8b79d6fa26e89116 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_backend_util.h
+++ b/chrome/browser/sync_file_system/drive_backend/drive_backend_util.h
@@ -50,7 +50,10 @@ std::string GetTrackerTitle(const FileTracker& tracker);
SyncStatusCode GDataErrorCodeToSyncStatusCode(
google_apis::GDataErrorCode error);
-std::string RemovePrefix(const std::string& str, const std::string& prefix);
+// Returns true if |str| starts with |prefix|, and removes |prefix| from |str|.
+// If |out| is not NULL, the result is stored in it.
+bool RemovePrefix(const std::string& str, const std::string& prefix,
+ std::string* out);
template <typename Src, typename Dest>
void AppendContents(const Src& src, Dest* dest) {
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698