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

Side by Side Diff: components/sync_driver/sync_service.h

Issue 1907683003: Convert //components/sync_driver from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix, address feedback 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
« no previous file with comments | « components/sync_driver/sync_prefs.cc ('k') | components/sync_driver/sync_stopped_reporter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_
6 #define COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ 6 #define COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
11 #include "base/location.h" 12 #include "base/location.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "components/sync_driver/data_type_encryption_handler.h" 16 #include "components/sync_driver/data_type_encryption_handler.h"
17 #include "components/sync_driver/sync_service_observer.h" 17 #include "components/sync_driver/sync_service_observer.h"
18 #include "google_apis/gaia/google_service_auth_error.h" 18 #include "google_apis/gaia/google_service_auth_error.h"
19 #include "sync/internal_api/public/base/model_type.h" 19 #include "sync/internal_api/public/base/model_type.h"
20 #include "sync/internal_api/public/connection_status.h" 20 #include "sync/internal_api/public/connection_status.h"
21 21
22 class GoogleServiceAuthError; 22 class GoogleServiceAuthError;
23 23
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // Returns a weak pointer to the service's JsController. 314 // Returns a weak pointer to the service's JsController.
315 virtual base::WeakPtr<syncer::JsController> GetJsController() = 0; 315 virtual base::WeakPtr<syncer::JsController> GetJsController() = 0;
316 316
317 // Asynchronously fetches base::Value representations of all sync nodes and 317 // Asynchronously fetches base::Value representations of all sync nodes and
318 // returns them to the specified callback on this thread. 318 // returns them to the specified callback on this thread.
319 // 319 //
320 // These requests can live a long time and return when you least expect it. 320 // These requests can live a long time and return when you least expect it.
321 // For safety, the callback should be bound to some sort of WeakPtr<> or 321 // For safety, the callback should be bound to some sort of WeakPtr<> or
322 // scoped_refptr<>. 322 // scoped_refptr<>.
323 virtual void GetAllNodes( 323 virtual void GetAllNodes(
324 const base::Callback<void(scoped_ptr<base::ListValue>)>& callback) = 0; 324 const base::Callback<void(std::unique_ptr<base::ListValue>)>&
325 callback) = 0;
325 326
326 protected: 327 protected:
327 SyncService() {} 328 SyncService() {}
328 329
329 private: 330 private:
330 DISALLOW_COPY_AND_ASSIGN(SyncService); 331 DISALLOW_COPY_AND_ASSIGN(SyncService);
331 }; 332 };
332 333
333 } // namespace sync_driver 334 } // namespace sync_driver
334 335
335 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ 336 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « components/sync_driver/sync_prefs.cc ('k') | components/sync_driver/sync_stopped_reporter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698