| OLD | NEW |
| 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 <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.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/base/model_type.h" | 16 #include "components/sync/base/model_type.h" |
| 17 #include "components/sync/driver/data_type_encryption_handler.h" | 17 #include "components/sync/driver/data_type_encryption_handler.h" |
| 18 #include "components/sync/driver/sync_service_observer.h" | 18 #include "components/sync/driver/sync_service_observer.h" |
| 19 #include "components/sync/engine/connection_status.h" | 19 #include "components/sync/engine/connection_status.h" |
| 20 #include "google_apis/gaia/google_service_auth_error.h" | 20 #include "google_apis/gaia/google_service_auth_error.h" |
| 21 | 21 |
| 22 class GoogleServiceAuthError; | 22 class GoogleServiceAuthError; |
| 23 class SigninManagerBase; |
| 23 | 24 |
| 24 namespace sync_sessions { | 25 namespace sync_sessions { |
| 25 class OpenTabsUIDelegate; | 26 class OpenTabsUIDelegate; |
| 26 } // namespace sync_sessions | 27 } // namespace sync_sessions |
| 27 | 28 |
| 28 namespace syncer { | 29 namespace syncer { |
| 29 | 30 |
| 30 class BaseTransaction; | 31 class BaseTransaction; |
| 31 class DataTypeController; | 32 class DataTypeController; |
| 32 class JsController; | 33 class JsController; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 // Asynchronously fetches base::Value representations of all sync nodes and | 341 // Asynchronously fetches base::Value representations of all sync nodes and |
| 341 // returns them to the specified callback on this thread. | 342 // returns them to the specified callback on this thread. |
| 342 // | 343 // |
| 343 // These requests can live a long time and return when you least expect it. | 344 // These requests can live a long time and return when you least expect it. |
| 344 // For safety, the callback should be bound to some sort of WeakPtr<> or | 345 // For safety, the callback should be bound to some sort of WeakPtr<> or |
| 345 // scoped_refptr<>. | 346 // scoped_refptr<>. |
| 346 virtual void GetAllNodes( | 347 virtual void GetAllNodes( |
| 347 const base::Callback<void(std::unique_ptr<base::ListValue>)>& | 348 const base::Callback<void(std::unique_ptr<base::ListValue>)>& |
| 348 callback) = 0; | 349 callback) = 0; |
| 349 | 350 |
| 351 // Non-owning pointer to sign in logic that can be used to fetch information |
| 352 // about the currently signed in user. |
| 353 virtual SigninManagerBase* signin() const = 0; |
| 354 |
| 350 protected: | 355 protected: |
| 351 SyncService() {} | 356 SyncService() {} |
| 352 | 357 |
| 353 private: | 358 private: |
| 354 DISALLOW_COPY_AND_ASSIGN(SyncService); | 359 DISALLOW_COPY_AND_ASSIGN(SyncService); |
| 355 }; | 360 }; |
| 356 | 361 |
| 357 } // namespace syncer | 362 } // namespace syncer |
| 358 | 363 |
| 359 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ | 364 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ |
| OLD | NEW |