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

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

Issue 177233005: [SyncFS] Wire up MetadataDatabaseIndex to MetadataDatabase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
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 ba9b851672d3913a20ea5b6b91d54d8b08973124..0d5f2bdaed9798ff0f1dd1d3c4f67687900cc186 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
@@ -68,6 +68,13 @@ scoped_ptr<google_apis::ResourceEntry> GetOldestCreatedFolderResource(
SyncStatusCode GDataErrorCodeToSyncStatusCode(
google_apis::GDataErrorCode error);
+template <typename T>
+scoped_ptr<T> Clone(const T* obj) {
+ if (!obj)
+ return scoped_ptr<T>();
+ return scoped_ptr<T>(new T(*obj));
+}
+
template <typename Src, typename Dest>
void AppendContents(const Src& src, Dest* dest) {
dest->insert(dest->end(), src.begin(), src.end());

Powered by Google App Engine
This is Rietveld 408576698