| 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 CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/location.h" | 15 #include "base/location.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 19 #include "base/string16.h" | 19 #include "base/string16.h" |
| 20 #include "base/time.h" | 20 #include "base/time.h" |
| 21 #include "base/timer.h" | 21 #include "base/timer.h" |
| 22 #include "chrome/browser/profiles/profile_keyed_service.h" | 22 #include "chrome/browser/profiles/profile_keyed_service.h" |
| 23 #include "chrome/browser/sync/backend_unrecoverable_error_handler.h" | 23 #include "chrome/browser/sync/backend_unrecoverable_error_handler.h" |
| 24 #include "chrome/browser/sync/failed_datatypes_handler.h" | 24 #include "chrome/browser/sync/failed_datatypes_handler.h" |
| 25 #include "chrome/browser/sync/glue/data_type_controller.h" | 25 #include "chrome/browser/sync/glue/data_type_controller.h" |
| 26 #include "chrome/browser/sync/glue/data_type_manager.h" | 26 #include "chrome/browser/sync/glue/data_type_manager.h" |
| 27 #include "chrome/browser/sync/glue/sync_backend_host.h" | 27 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 28 #include "chrome/browser/sync/invalidations/invalidator_storage.h" |
| 28 #include "chrome/browser/sync/profile_sync_service_observer.h" | 29 #include "chrome/browser/sync/profile_sync_service_observer.h" |
| 29 #include "chrome/browser/sync/sync_prefs.h" | 30 #include "chrome/browser/sync/sync_prefs.h" |
| 30 #include "chrome/common/net/gaia/google_service_auth_error.h" | 31 #include "chrome/common/net/gaia/google_service_auth_error.h" |
| 31 #include "content/public/browser/notification_observer.h" | 32 #include "content/public/browser/notification_observer.h" |
| 32 #include "content/public/browser/notification_registrar.h" | 33 #include "content/public/browser/notification_registrar.h" |
| 33 #include "content/public/browser/notification_types.h" | 34 #include "content/public/browser/notification_types.h" |
| 34 #include "googleurl/src/gurl.h" | 35 #include "googleurl/src/gurl.h" |
| 35 #include "sync/engine/model_safe_worker.h" | 36 #include "sync/engine/model_safe_worker.h" |
| 36 #include "sync/js/sync_js_controller.h" | 37 #include "sync/js/sync_js_controller.h" |
| 37 #include "sync/syncable/model_type.h" | 38 #include "sync/syncable/model_type.h" |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 // Factory used to create various dependent objects. | 634 // Factory used to create various dependent objects. |
| 634 scoped_ptr<ProfileSyncComponentsFactory> factory_; | 635 scoped_ptr<ProfileSyncComponentsFactory> factory_; |
| 635 | 636 |
| 636 // The profile whose data we are synchronizing. | 637 // The profile whose data we are synchronizing. |
| 637 Profile* profile_; | 638 Profile* profile_; |
| 638 | 639 |
| 639 // The class that handles getting, setting, and persisting sync | 640 // The class that handles getting, setting, and persisting sync |
| 640 // preferences. | 641 // preferences. |
| 641 browser_sync::SyncPrefs sync_prefs_; | 642 browser_sync::SyncPrefs sync_prefs_; |
| 642 | 643 |
| 644 // TODO(tim): Move this to InvalidationService, once it exists. Bug 124137. |
| 645 browser_sync::InvalidatorStorage invalidator_storage_; |
| 646 |
| 643 // TODO(ncarter): Put this in a profile, once there is UI for it. | 647 // TODO(ncarter): Put this in a profile, once there is UI for it. |
| 644 // This specifies where to find the sync server. | 648 // This specifies where to find the sync server. |
| 645 GURL sync_service_url_; | 649 GURL sync_service_url_; |
| 646 | 650 |
| 647 // The last time we detected a successful transition from SYNCING state. | 651 // The last time we detected a successful transition from SYNCING state. |
| 648 // Our backend notifies us whenever we should take a new snapshot. | 652 // Our backend notifies us whenever we should take a new snapshot. |
| 649 base::Time last_synced_time_; | 653 base::Time last_synced_time_; |
| 650 | 654 |
| 651 // List of available data type controllers. | 655 // List of available data type controllers. |
| 652 browser_sync::DataTypeController::TypeMap data_type_controllers_; | 656 browser_sync::DataTypeController::TypeMap data_type_controllers_; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 browser_sync::Experiments current_experiments; | 757 browser_sync::Experiments current_experiments; |
| 754 | 758 |
| 755 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 759 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 756 }; | 760 }; |
| 757 | 761 |
| 758 bool ShouldShowActionOnUI( | 762 bool ShouldShowActionOnUI( |
| 759 const browser_sync::SyncProtocolError& error); | 763 const browser_sync::SyncProtocolError& error); |
| 760 | 764 |
| 761 | 765 |
| 762 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 766 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |