OLD | NEW |
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 COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 // Returns a serialized NigoriKey proto generated from the bootstrap token in | 552 // Returns a serialized NigoriKey proto generated from the bootstrap token in |
553 // SyncPrefs. Will return the empty string if no bootstrap token exists. | 553 // SyncPrefs. Will return the empty string if no bootstrap token exists. |
554 std::string GetCustomPassphraseKey() const; | 554 std::string GetCustomPassphraseKey() const; |
555 | 555 |
556 // Set the provider for whether sync is currently allowed by the platform. | 556 // Set the provider for whether sync is currently allowed by the platform. |
557 void SetPlatformSyncAllowedProvider( | 557 void SetPlatformSyncAllowedProvider( |
558 const PlatformSyncAllowedProvider& platform_sync_allowed_provider); | 558 const PlatformSyncAllowedProvider& platform_sync_allowed_provider); |
559 | 559 |
560 // Returns a function for |type| that will create a ModelTypeStore that shares | 560 // Returns a function for |type| that will create a ModelTypeStore that shares |
561 // the sync LevelDB backend. |base_path| should be set to profile path. | 561 // the sync LevelDB backend. |base_path| should be set to profile path. |
562 // |sequenced_worker_pool| is obtained from content::BrowserThread or | |
563 // web::WebThread depending on platform. | |
564 static syncer::ModelTypeStoreFactory GetModelTypeStoreFactory( | 562 static syncer::ModelTypeStoreFactory GetModelTypeStoreFactory( |
565 syncer::ModelType type, | 563 syncer::ModelType type, |
566 const base::FilePath& base_path, | 564 const base::FilePath& base_path); |
567 base::SequencedWorkerPool* sequenced_worker_pool); | |
568 | 565 |
569 // Needed to test whether the directory is deleted properly. | 566 // Needed to test whether the directory is deleted properly. |
570 base::FilePath GetDirectoryPathForTest() const; | 567 base::FilePath GetDirectoryPathForTest() const; |
571 | 568 |
572 // Sometimes we need to wait for tasks on the sync thread in tests. | 569 // Sometimes we need to wait for tasks on the sync thread in tests. |
573 base::MessageLoop* GetSyncLoopForTest() const; | 570 base::MessageLoop* GetSyncLoopForTest() const; |
574 | 571 |
575 // Some tests rely on injecting calls to the encryption observer. | 572 // Some tests rely on injecting calls to the encryption observer. |
576 syncer::SyncEncryptionHandler::Observer* GetEncryptionObserverForTest() const; | 573 syncer::SyncEncryptionHandler::Observer* GetEncryptionObserverForTest() const; |
577 | 574 |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 base::WeakPtrFactory<ProfileSyncService> weak_factory_; | 896 base::WeakPtrFactory<ProfileSyncService> weak_factory_; |
900 | 897 |
901 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 898 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
902 }; | 899 }; |
903 | 900 |
904 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); | 901 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); |
905 | 902 |
906 } // namespace browser_sync | 903 } // namespace browser_sync |
907 | 904 |
908 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 905 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |