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

Side by Side Diff: chrome/browser/sync_file_system/remote_file_sync_service.h

Issue 1873683002: Convert //chrome/browser/sync_file_system from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory>
11 #include <set> 12 #include <set>
12 #include <string> 13 #include <string>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "chrome/browser/sync_file_system/conflict_resolution_policy.h" 17 #include "chrome/browser/sync_file_system/conflict_resolution_policy.h"
18 #include "chrome/browser/sync_file_system/sync_callbacks.h" 18 #include "chrome/browser/sync_file_system/sync_callbacks.h"
19 #include "chrome/browser/sync_file_system/sync_file_metadata.h" 19 #include "chrome/browser/sync_file_system/sync_file_metadata.h"
20 #include "storage/browser/fileapi/file_system_url.h" 20 #include "storage/browser/fileapi/file_system_url.h"
21 21
22 class BrowserContextKeyedServiceFactory; 22 class BrowserContextKeyedServiceFactory;
23 class GURL; 23 class GURL;
24 24
25 namespace base { 25 namespace base {
26 class ListValue; 26 class ListValue;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 SyncFileMetadata metadata; 110 SyncFileMetadata metadata;
111 }; 111 };
112 112
113 enum UninstallFlag { 113 enum UninstallFlag {
114 UNINSTALL_AND_PURGE_REMOTE, 114 UNINSTALL_AND_PURGE_REMOTE,
115 UNINSTALL_AND_KEEP_REMOTE, 115 UNINSTALL_AND_KEEP_REMOTE,
116 }; 116 };
117 117
118 // For GetOriginStatusMap. 118 // For GetOriginStatusMap.
119 typedef std::map<GURL, std::string> OriginStatusMap; 119 typedef std::map<GURL, std::string> OriginStatusMap;
120 typedef base::Callback<void(scoped_ptr<OriginStatusMap> status_map)> 120 typedef base::Callback<void(std::unique_ptr<OriginStatusMap> status_map)>
121 StatusMapCallback; 121 StatusMapCallback;
122 122
123 // For GetRemoteVersions. 123 // For GetRemoteVersions.
124 typedef base::Callback<void(SyncStatusCode status, 124 typedef base::Callback<void(SyncStatusCode status,
125 const std::vector<Version>& versions)> 125 const std::vector<Version>& versions)>
126 RemoteVersionsCallback; 126 RemoteVersionsCallback;
127 typedef base::Callback< 127 typedef base::Callback<
128 void(SyncStatusCode status, storage::ScopedFile downloaded)> 128 void(SyncStatusCode status, storage::ScopedFile downloaded)>
129 DownloadVersionCallback; 129 DownloadVersionCallback;
130 130
131 // For DumpFile. 131 // For DumpFile.
132 typedef base::Callback<void(scoped_ptr<base::ListValue> list)> ListCallback; 132 typedef base::Callback<void(std::unique_ptr<base::ListValue> list)>
133 ListCallback;
133 134
134 // Creates an initialized RemoteFileSyncService for backend |version| 135 // Creates an initialized RemoteFileSyncService for backend |version|
135 // for |context|. 136 // for |context|.
136 static scoped_ptr<RemoteFileSyncService> CreateForBrowserContext( 137 static std::unique_ptr<RemoteFileSyncService> CreateForBrowserContext(
137 content::BrowserContext* context, 138 content::BrowserContext* context,
138 TaskLogger* task_logger); 139 TaskLogger* task_logger);
139 140
140 // Returns BrowserContextKeyedServiceFactory's an instance of 141 // Returns BrowserContextKeyedServiceFactory's an instance of
141 // RemoteFileSyncService for backend |version| depends on. 142 // RemoteFileSyncService for backend |version| depends on.
142 static void AppendDependsOnFactories( 143 static void AppendDependsOnFactories(
143 std::set<BrowserContextKeyedServiceFactory*>* factories); 144 std::set<BrowserContextKeyedServiceFactory*>* factories);
144 145
145 RemoteFileSyncService() {} 146 RemoteFileSyncService() {}
146 virtual ~RemoteFileSyncService() {} 147 virtual ~RemoteFileSyncService() {}
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 216
216 virtual void PromoteDemotedChanges(const base::Closure& callback) = 0; 217 virtual void PromoteDemotedChanges(const base::Closure& callback) = 0;
217 218
218 private: 219 private:
219 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); 220 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService);
220 }; 221 };
221 222
222 } // namespace sync_file_system 223 } // namespace sync_file_system
223 224
224 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ 225 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698