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 #include "chrome/browser/ui/webui/settings/sync_handler.h" | 5 #include "chrome/browser/ui/webui/settings/sync_handler.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
14 #include "base/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/prefs/pref_service.h" | 16 #include "base/prefs/pref_service.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "chrome/browser/lifetime/application_lifetime.h" | 18 #include "chrome/browser/lifetime/application_lifetime.h" |
19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/profiles/profile_info_cache.h" | 20 #include "chrome/browser/profiles/profile_info_cache.h" |
21 #include "chrome/browser/profiles/profile_metrics.h" | 21 #include "chrome/browser/profiles/profile_metrics.h" |
22 #include "chrome/browser/signin/chrome_signin_helper.h" | 22 #include "chrome/browser/signin/chrome_signin_helper.h" |
23 #include "chrome/browser/signin/signin_error_controller_factory.h" | 23 #include "chrome/browser/signin/signin_error_controller_factory.h" |
24 #include "chrome/browser/signin/signin_manager_factory.h" | 24 #include "chrome/browser/signin/signin_manager_factory.h" |
25 #include "chrome/browser/signin/signin_promo.h" | 25 #include "chrome/browser/signin/signin_promo.h" |
26 #include "chrome/browser/sync/profile_sync_service.h" | |
27 #include "chrome/browser/sync/profile_sync_service_factory.h" | 26 #include "chrome/browser/sync/profile_sync_service_factory.h" |
28 #include "chrome/browser/ui/browser_finder.h" | 27 #include "chrome/browser/ui/browser_finder.h" |
29 #include "chrome/browser/ui/browser_window.h" | 28 #include "chrome/browser/ui/browser_window.h" |
30 #include "chrome/browser/ui/singleton_tabs.h" | 29 #include "chrome/browser/ui/singleton_tabs.h" |
31 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" | 30 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" |
32 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 31 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
33 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 32 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
34 #include "chrome/common/chrome_switches.h" | 33 #include "chrome/common/chrome_switches.h" |
35 #include "chrome/grit/generated_resources.h" | 34 #include "chrome/grit/generated_resources.h" |
| 35 #include "components/browser_sync/browser/profile_sync_service.h" |
36 #include "components/signin/core/browser/signin_error_controller.h" | 36 #include "components/signin/core/browser/signin_error_controller.h" |
37 #include "components/signin/core/browser/signin_header_helper.h" | 37 #include "components/signin/core/browser/signin_header_helper.h" |
38 #include "components/signin/core/browser/signin_metrics.h" | 38 #include "components/signin/core/browser/signin_metrics.h" |
39 #include "components/signin/core/common/profile_management_switches.h" | 39 #include "components/signin/core/common/profile_management_switches.h" |
40 #include "components/sync_driver/sync_prefs.h" | 40 #include "components/sync_driver/sync_prefs.h" |
41 #include "content/public/browser/render_view_host.h" | 41 #include "content/public/browser/render_view_host.h" |
42 #include "content/public/browser/web_contents.h" | 42 #include "content/public/browser/web_contents.h" |
43 #include "content/public/browser/web_contents_delegate.h" | 43 #include "content/public/browser/web_contents_delegate.h" |
44 #include "google_apis/gaia/gaia_auth_util.h" | 44 #include "google_apis/gaia/gaia_auth_util.h" |
45 #include "google_apis/gaia/gaia_constants.h" | 45 #include "google_apis/gaia/gaia_constants.h" |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 // Make sure the tab used for the Gaia sign in does not cover the settings | 805 // Make sure the tab used for the Gaia sign in does not cover the settings |
806 // tab. | 806 // tab. |
807 FocusUI(); | 807 FocusUI(); |
808 } | 808 } |
809 | 809 |
810 LoginUIService* SyncHandler::GetLoginUIService() const { | 810 LoginUIService* SyncHandler::GetLoginUIService() const { |
811 return LoginUIServiceFactory::GetForProfile(GetProfile()); | 811 return LoginUIServiceFactory::GetForProfile(GetProfile()); |
812 } | 812 } |
813 | 813 |
814 } // namespace settings | 814 } // namespace settings |
OLD | NEW |