| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "base/string16.h" | 15 #include "base/string16.h" |
| 16 #include "base/task.h" | 16 #include "base/task.h" |
| 17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #include "base/timer.h" | 18 #include "base/timer.h" |
| 19 #include "base/tracked.h" | 19 #include "base/tracked.h" |
| 20 #include "chrome/browser/net/chrome_cookie_notification_details.h" | |
| 21 #include "chrome/browser/prefs/pref_member.h" | 20 #include "chrome/browser/prefs/pref_member.h" |
| 22 #include "chrome/browser/sync/engine/model_safe_worker.h" | 21 #include "chrome/browser/sync/engine/model_safe_worker.h" |
| 23 #include "chrome/browser/sync/glue/data_type_controller.h" | 22 #include "chrome/browser/sync/glue/data_type_controller.h" |
| 24 #include "chrome/browser/sync/glue/sync_backend_host.h" | 23 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 25 #include "chrome/browser/sync/js_event_handler_list.h" | 24 #include "chrome/browser/sync/js_event_handler_list.h" |
| 26 #include "chrome/browser/sync/profile_sync_service_observer.h" | 25 #include "chrome/browser/sync/profile_sync_service_observer.h" |
| 27 #include "chrome/browser/sync/sync_setup_wizard.h" | 26 #include "chrome/browser/sync/sync_setup_wizard.h" |
| 28 #include "chrome/browser/sync/syncable/autofill_migration.h" | 27 #include "chrome/browser/sync/syncable/autofill_migration.h" |
| 29 #include "chrome/browser/sync/syncable/model_type.h" | 28 #include "chrome/browser/sync/syncable/model_type.h" |
| 30 #include "chrome/browser/sync/unrecoverable_error_handler.h" | 29 #include "chrome/browser/sync/unrecoverable_error_handler.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 const syncable::ModelTypeSet& encrypted_types); | 201 const syncable::ModelTypeSet& encrypted_types); |
| 203 virtual void OnMigrationNeededForTypes( | 202 virtual void OnMigrationNeededForTypes( |
| 204 const syncable::ModelTypeSet& types); | 203 const syncable::ModelTypeSet& types); |
| 205 | 204 |
| 206 // Called when a user enters credentials through UI. | 205 // Called when a user enters credentials through UI. |
| 207 virtual void OnUserSubmittedAuth(const std::string& username, | 206 virtual void OnUserSubmittedAuth(const std::string& username, |
| 208 const std::string& password, | 207 const std::string& password, |
| 209 const std::string& captcha, | 208 const std::string& captcha, |
| 210 const std::string& access_code); | 209 const std::string& access_code); |
| 211 | 210 |
| 212 // Called when a cookie, e. g. oauth_token, changes | |
| 213 virtual void OnCookieChanged(Profile* profile, | |
| 214 ChromeCookieDetails* cookie_details); | |
| 215 | |
| 216 // Update the last auth error and notify observers of error state. | 211 // Update the last auth error and notify observers of error state. |
| 217 void UpdateAuthErrorState(const GoogleServiceAuthError& error); | 212 void UpdateAuthErrorState(const GoogleServiceAuthError& error); |
| 218 | 213 |
| 219 // Called when a user chooses which data types to sync as part of the sync | 214 // Called when a user chooses which data types to sync as part of the sync |
| 220 // setup wizard. |sync_everything| represents whether they chose the | 215 // setup wizard. |sync_everything| represents whether they chose the |
| 221 // "keep everything synced" option; if true, |chosen_types| will be ignored | 216 // "keep everything synced" option; if true, |chosen_types| will be ignored |
| 222 // and all data types will be synced. |sync_everything| means "sync all | 217 // and all data types will be synced. |sync_everything| means "sync all |
| 223 // current and future data types." | 218 // current and future data types." |
| 224 virtual void OnUserChoseDatatypes(bool sync_everything, | 219 virtual void OnUserChoseDatatypes(bool sync_everything, |
| 225 const syncable::ModelTypeSet& chosen_types); | 220 const syncable::ModelTypeSet& chosen_types); |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 // because we haven't finished initializing). Cleared when we successfully | 651 // because we haven't finished initializing). Cleared when we successfully |
| 657 // post a new encrypt task to the sync backend. | 652 // post a new encrypt task to the sync backend. |
| 658 syncable::ModelTypeSet pending_types_for_encryption_; | 653 syncable::ModelTypeSet pending_types_for_encryption_; |
| 659 | 654 |
| 660 scoped_ptr<browser_sync::BackendMigrator> migrator_; | 655 scoped_ptr<browser_sync::BackendMigrator> migrator_; |
| 661 | 656 |
| 662 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 657 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 663 }; | 658 }; |
| 664 | 659 |
| 665 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 660 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |