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

Side by Side Diff: chrome/browser/sync_file_system/local/local_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_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 14
14 #include "base/callback.h" 15 #include "base/callback.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/observer_list.h" 19 #include "base/observer_list.h"
20 #include "chrome/browser/sync_file_system/local/local_origin_change_observer.h" 20 #include "chrome/browser/sync_file_system/local/local_origin_change_observer.h"
21 #include "chrome/browser/sync_file_system/remote_change_processor.h" 21 #include "chrome/browser/sync_file_system/remote_change_processor.h"
22 #include "chrome/browser/sync_file_system/sync_callbacks.h" 22 #include "chrome/browser/sync_file_system/sync_callbacks.h"
23 #include "chrome/browser/sync_file_system/sync_status_code.h" 23 #include "chrome/browser/sync_file_system/sync_status_code.h"
24 24
25 class GURL; 25 class GURL;
26 class Profile; 26 class Profile;
27 27
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 virtual void OnLocalChangeAvailable(int64_t pending_changes_hint) = 0; 66 virtual void OnLocalChangeAvailable(int64_t pending_changes_hint) = 0;
67 67
68 private: 68 private:
69 DISALLOW_COPY_AND_ASSIGN(Observer); 69 DISALLOW_COPY_AND_ASSIGN(Observer);
70 }; 70 };
71 71
72 typedef base::Callback<void(SyncStatusCode status, 72 typedef base::Callback<void(SyncStatusCode status,
73 bool has_pending_changes)> 73 bool has_pending_changes)>
74 HasPendingLocalChangeCallback; 74 HasPendingLocalChangeCallback;
75 75
76 static scoped_ptr<LocalFileSyncService> Create(Profile* profile); 76 static std::unique_ptr<LocalFileSyncService> Create(Profile* profile);
77 static scoped_ptr<LocalFileSyncService> CreateForTesting( 77 static std::unique_ptr<LocalFileSyncService> CreateForTesting(
78 Profile* profile, 78 Profile* profile,
79 leveldb::Env* env_override); 79 leveldb::Env* env_override);
80 ~LocalFileSyncService() override; 80 ~LocalFileSyncService() override;
81 81
82 void Shutdown(); 82 void Shutdown();
83 83
84 void MaybeInitializeFileSystemContext( 84 void MaybeInitializeFileSystemContext(
85 const GURL& app_origin, 85 const GURL& app_origin,
86 storage::FileSystemContext* file_system_context, 86 storage::FileSystemContext* file_system_context,
87 const SyncStatusCallback& callback); 87 const SyncStatusCallback& callback);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 GetLocalChangeProcessorCallback get_local_change_processor_; 239 GetLocalChangeProcessorCallback get_local_change_processor_;
240 240
241 base::ObserverList<Observer> change_observers_; 241 base::ObserverList<Observer> change_observers_;
242 242
243 DISALLOW_COPY_AND_ASSIGN(LocalFileSyncService); 243 DISALLOW_COPY_AND_ASSIGN(LocalFileSyncService);
244 }; 244 };
245 245
246 } // namespace sync_file_system 246 } // namespace sync_file_system
247 247
248 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ 248 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698