| 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 #include "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
| 16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/message_loop.h" | 19 #include "base/message_loop.h" |
| 20 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
| 21 #include "base/string16.h" | 21 #include "base/string16.h" |
| 22 #include "base/stringprintf.h" | 22 #include "base/stringprintf.h" |
| 23 #include "base/threading/thread_restrictions.h" | 23 #include "base/threading/thread_restrictions.h" |
| 24 #include "chrome/browser/about_flags.h" | 24 #include "chrome/browser/about_flags.h" |
| 25 #include "chrome/browser/browser_process.h" | 25 #include "chrome/browser/browser_process.h" |
| 26 #include "chrome/browser/defaults.h" |
| 26 #include "chrome/browser/net/chrome_cookie_notification_details.h" | 27 #include "chrome/browser/net/chrome_cookie_notification_details.h" |
| 27 #include "chrome/browser/defaults.h" | |
| 28 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
| 29 #include "chrome/browser/signin/signin_manager.h" | 29 #include "chrome/browser/signin/signin_manager.h" |
| 30 #include "chrome/browser/signin/signin_manager_factory.h" | 30 #include "chrome/browser/signin/signin_manager_factory.h" |
| 31 #include "chrome/browser/signin/token_service.h" | 31 #include "chrome/browser/signin/token_service.h" |
| 32 #include "chrome/browser/signin/token_service_factory.h" | 32 #include "chrome/browser/signin/token_service_factory.h" |
| 33 #include "chrome/browser/sync/api/sync_error.h" | 33 #include "chrome/browser/sync/api/sync_error.h" |
| 34 #include "chrome/browser/sync/backend_migrator.h" | 34 #include "chrome/browser/sync/backend_migrator.h" |
| 35 #include "chrome/browser/sync/glue/change_processor.h" | 35 #include "chrome/browser/sync/glue/change_processor.h" |
| 36 #include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h" | 36 #include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h" |
| 37 #include "chrome/browser/sync/glue/data_type_controller.h" | 37 #include "chrome/browser/sync/glue/data_type_controller.h" |
| 38 #include "chrome/browser/sync/glue/session_data_type_controller.h" | 38 #include "chrome/browser/sync/glue/session_data_type_controller.h" |
| 39 #include "chrome/browser/sync/glue/session_model_associator.h" | 39 #include "chrome/browser/sync/glue/session_model_associator.h" |
| 40 #include "chrome/browser/sync/glue/typed_url_data_type_controller.h" | 40 #include "chrome/browser/sync/glue/typed_url_data_type_controller.h" |
| 41 #include "chrome/browser/sync/internal_api/configure_reason.h" | 41 #include "chrome/browser/sync/internal_api/configure_reason.h" |
| 42 #include "chrome/browser/sync/internal_api/sync_manager.h" | 42 #include "chrome/browser/sync/internal_api/sync_manager.h" |
| 43 #include "chrome/browser/sync/js/js_arg_list.h" | |
| 44 #include "chrome/browser/sync/js/js_event_details.h" | |
| 45 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" | 43 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" |
| 46 #include "chrome/browser/sync/sync_global_error.h" | 44 #include "chrome/browser/sync/sync_global_error.h" |
| 47 #include "chrome/browser/sync/util/cryptographer.h" | |
| 48 #include "chrome/browser/ui/browser.h" | 45 #include "chrome/browser/ui/browser.h" |
| 49 #include "chrome/browser/ui/browser_list.h" | 46 #include "chrome/browser/ui/browser_list.h" |
| 50 #include "chrome/browser/ui/browser_window.h" | 47 #include "chrome/browser/ui/browser_window.h" |
| 51 #include "chrome/browser/ui/global_error_service.h" | 48 #include "chrome/browser/ui/global_error_service.h" |
| 52 #include "chrome/browser/ui/global_error_service_factory.h" | 49 #include "chrome/browser/ui/global_error_service_factory.h" |
| 53 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 50 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
| 54 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 51 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
| 55 #include "chrome/common/chrome_notification_types.h" | 52 #include "chrome/common/chrome_notification_types.h" |
| 56 #include "chrome/common/chrome_switches.h" | 53 #include "chrome/common/chrome_switches.h" |
| 57 #include "chrome/common/chrome_version_info.h" | 54 #include "chrome/common/chrome_version_info.h" |
| 58 #include "chrome/common/net/gaia/gaia_constants.h" | 55 #include "chrome/common/net/gaia/gaia_constants.h" |
| 59 #include "chrome/common/time_format.h" | 56 #include "chrome/common/time_format.h" |
| 60 #include "chrome/common/url_constants.h" | 57 #include "chrome/common/url_constants.h" |
| 61 #include "content/public/browser/notification_details.h" | 58 #include "content/public/browser/notification_details.h" |
| 62 #include "content/public/browser/notification_source.h" | 59 #include "content/public/browser/notification_source.h" |
| 63 #include "grit/generated_resources.h" | 60 #include "grit/generated_resources.h" |
| 64 #include "net/base/cookie_monster.h" | 61 #include "net/base/cookie_monster.h" |
| 62 #include "sync/js/js_arg_list.h" |
| 63 #include "sync/js/js_event_details.h" |
| 64 #include "sync/util/cryptographer.h" |
| 65 #include "ui/base/l10n/l10n_util.h" | 65 #include "ui/base/l10n/l10n_util.h" |
| 66 | 66 |
| 67 using browser_sync::ChangeProcessor; | 67 using browser_sync::ChangeProcessor; |
| 68 using browser_sync::DataTypeController; | 68 using browser_sync::DataTypeController; |
| 69 using browser_sync::DataTypeManager; | 69 using browser_sync::DataTypeManager; |
| 70 using browser_sync::JsBackend; | 70 using browser_sync::JsBackend; |
| 71 using browser_sync::JsController; | 71 using browser_sync::JsController; |
| 72 using browser_sync::JsEventDetails; | 72 using browser_sync::JsEventDetails; |
| 73 using browser_sync::JsEventHandler; | 73 using browser_sync::JsEventHandler; |
| 74 using browser_sync::SyncBackendHost; | 74 using browser_sync::SyncBackendHost; |
| (...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1671 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
| 1672 ProfileSyncService* old_this = this; | 1672 ProfileSyncService* old_this = this; |
| 1673 this->~ProfileSyncService(); | 1673 this->~ProfileSyncService(); |
| 1674 new(old_this) ProfileSyncService( | 1674 new(old_this) ProfileSyncService( |
| 1675 new ProfileSyncComponentsFactoryImpl(profile, | 1675 new ProfileSyncComponentsFactoryImpl(profile, |
| 1676 CommandLine::ForCurrentProcess()), | 1676 CommandLine::ForCurrentProcess()), |
| 1677 profile, | 1677 profile, |
| 1678 signin, | 1678 signin, |
| 1679 behavior); | 1679 behavior); |
| 1680 } | 1680 } |
| OLD | NEW |