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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_worker_interface.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DRIVE_BACKEND_SYNC_WORKER_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_WORKER_INTERFACE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_WORKER_INTERFACE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_WORKER_INTERFACE_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/sync_file_system/remote_file_sync_service.h" 12 #include "chrome/browser/sync_file_system/remote_file_sync_service.h"
13 #include "chrome/browser/sync_file_system/sync_action.h" 13 #include "chrome/browser/sync_file_system/sync_action.h"
14 #include "chrome/browser/sync_file_system/sync_callbacks.h" 14 #include "chrome/browser/sync_file_system/sync_callbacks.h"
15 #include "chrome/browser/sync_file_system/sync_direction.h" 15 #include "chrome/browser/sync_file_system/sync_direction.h"
16 #include "net/base/network_change_notifier.h" 16 #include "net/base/network_change_notifier.h"
17 17
18 class GURL; 18 class GURL;
19 19
20 namespace base { 20 namespace base {
21 class FilePath; 21 class FilePath;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 protected: 59 protected:
60 virtual ~Observer() {} 60 virtual ~Observer() {}
61 }; 61 };
62 62
63 SyncWorkerInterface() {} 63 SyncWorkerInterface() {}
64 virtual ~SyncWorkerInterface() {} 64 virtual ~SyncWorkerInterface() {}
65 65
66 // Initializes SyncWorkerInterface after constructions of some member classes. 66 // Initializes SyncWorkerInterface after constructions of some member classes.
67 virtual void Initialize( 67 virtual void Initialize(
68 scoped_ptr<SyncEngineContext> sync_engine_context) = 0; 68 std::unique_ptr<SyncEngineContext> sync_engine_context) = 0;
69 69
70 // See RemoteFileSyncService for the details. 70 // See RemoteFileSyncService for the details.
71 virtual void RegisterOrigin(const GURL& origin, 71 virtual void RegisterOrigin(const GURL& origin,
72 const SyncStatusCallback& callback) = 0; 72 const SyncStatusCallback& callback) = 0;
73 virtual void EnableOrigin(const GURL& origin, 73 virtual void EnableOrigin(const GURL& origin,
74 const SyncStatusCallback& callback) = 0; 74 const SyncStatusCallback& callback) = 0;
75 virtual void DisableOrigin(const GURL& origin, 75 virtual void DisableOrigin(const GURL& origin,
76 const SyncStatusCallback& callback) = 0; 76 const SyncStatusCallback& callback) = 0;
77 virtual void UninstallOrigin( 77 virtual void UninstallOrigin(
78 const GURL& origin, 78 const GURL& origin,
79 RemoteFileSyncService::UninstallFlag flag, 79 RemoteFileSyncService::UninstallFlag flag,
80 const SyncStatusCallback& callback) = 0; 80 const SyncStatusCallback& callback) = 0;
81 virtual void ProcessRemoteChange(const SyncFileCallback& callback) = 0; 81 virtual void ProcessRemoteChange(const SyncFileCallback& callback) = 0;
82 virtual void SetRemoteChangeProcessor( 82 virtual void SetRemoteChangeProcessor(
83 RemoteChangeProcessorOnWorker* remote_change_processor_on_worker) = 0; 83 RemoteChangeProcessorOnWorker* remote_change_processor_on_worker) = 0;
84 virtual RemoteServiceState GetCurrentState() const = 0; 84 virtual RemoteServiceState GetCurrentState() const = 0;
85 virtual void GetOriginStatusMap( 85 virtual void GetOriginStatusMap(
86 const RemoteFileSyncService::StatusMapCallback& callback) = 0; 86 const RemoteFileSyncService::StatusMapCallback& callback) = 0;
87 virtual scoped_ptr<base::ListValue> DumpFiles(const GURL& origin) = 0; 87 virtual std::unique_ptr<base::ListValue> DumpFiles(const GURL& origin) = 0;
88 virtual scoped_ptr<base::ListValue> DumpDatabase() = 0; 88 virtual std::unique_ptr<base::ListValue> DumpDatabase() = 0;
89 virtual void SetSyncEnabled(bool enabled) = 0; 89 virtual void SetSyncEnabled(bool enabled) = 0;
90 virtual void PromoteDemotedChanges(const base::Closure& callback) = 0; 90 virtual void PromoteDemotedChanges(const base::Closure& callback) = 0;
91 91
92 // See LocalChangeProcessor for the details. 92 // See LocalChangeProcessor for the details.
93 virtual void ApplyLocalChange(const FileChange& local_change, 93 virtual void ApplyLocalChange(const FileChange& local_change,
94 const base::FilePath& local_path, 94 const base::FilePath& local_path,
95 const SyncFileMetadata& local_metadata, 95 const SyncFileMetadata& local_metadata,
96 const storage::FileSystemURL& url, 96 const storage::FileSystemURL& url,
97 const SyncStatusCallback& callback) = 0; 97 const SyncStatusCallback& callback) = 0;
98 98
99 virtual void ActivateService(RemoteServiceState service_state, 99 virtual void ActivateService(RemoteServiceState service_state,
100 const std::string& description) = 0; 100 const std::string& description) = 0;
101 virtual void DeactivateService(const std::string& description) = 0; 101 virtual void DeactivateService(const std::string& description) = 0;
102 102
103 virtual void DetachFromSequence() = 0; 103 virtual void DetachFromSequence() = 0;
104 104
105 virtual void AddObserver(Observer* observer) = 0; 105 virtual void AddObserver(Observer* observer) = 0;
106 106
107 private: 107 private:
108 friend class SyncEngineTest; 108 friend class SyncEngineTest;
109 109
110 DISALLOW_COPY_AND_ASSIGN(SyncWorkerInterface); 110 DISALLOW_COPY_AND_ASSIGN(SyncWorkerInterface);
111 }; 111 };
112 112
113 } // namespace drive_backend 113 } // namespace drive_backend
114 } // namespace sync_file_system 114 } // namespace sync_file_system
115 115
116 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_WORKER_INTERFACE_H _ 116 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_WORKER_INTERFACE_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698