| 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/people_handler.h" | 5 #include "chrome/browser/ui/webui/settings/people_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/i18n/time_formatting.h" | 13 #include "base/i18n/time_formatting.h" |
| 14 #include "base/json/json_reader.h" | 14 #include "base/json/json_reader.h" |
| 15 #include "base/json/json_writer.h" | 15 #include "base/json/json_writer.h" |
| 16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
| 17 #include "base/prefs/pref_service.h" | |
| 18 #include "base/values.h" | 17 #include "base/values.h" |
| 19 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 20 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
| 21 #include "chrome/browser/lifetime/application_lifetime.h" | 20 #include "chrome/browser/lifetime/application_lifetime.h" |
| 22 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
| 23 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 22 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
| 24 #include "chrome/browser/profiles/profile_info_cache.h" | 23 #include "chrome/browser/profiles/profile_info_cache.h" |
| 25 #include "chrome/browser/profiles/profile_metrics.h" | 24 #include "chrome/browser/profiles/profile_metrics.h" |
| 26 #include "chrome/browser/profiles/profile_window.h" | 25 #include "chrome/browser/profiles/profile_window.h" |
| 27 #include "chrome/browser/signin/chrome_signin_helper.h" | 26 #include "chrome/browser/signin/chrome_signin_helper.h" |
| 28 #include "chrome/browser/signin/signin_error_controller_factory.h" | 27 #include "chrome/browser/signin/signin_error_controller_factory.h" |
| 29 #include "chrome/browser/signin/signin_manager_factory.h" | 28 #include "chrome/browser/signin/signin_manager_factory.h" |
| 30 #include "chrome/browser/signin/signin_promo.h" | 29 #include "chrome/browser/signin/signin_promo.h" |
| 31 #include "chrome/browser/sync/profile_sync_service_factory.h" | 30 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 32 #include "chrome/browser/sync/sync_ui_util.h" | 31 #include "chrome/browser/sync/sync_ui_util.h" |
| 33 #include "chrome/browser/ui/browser_finder.h" | 32 #include "chrome/browser/ui/browser_finder.h" |
| 34 #include "chrome/browser/ui/browser_window.h" | 33 #include "chrome/browser/ui/browser_window.h" |
| 35 #include "chrome/browser/ui/singleton_tabs.h" | 34 #include "chrome/browser/ui/singleton_tabs.h" |
| 36 #include "chrome/browser/ui/user_manager.h" | 35 #include "chrome/browser/ui/user_manager.h" |
| 37 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" | 36 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" |
| 38 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 37 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
| 39 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 38 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
| 40 #include "chrome/common/chrome_switches.h" | 39 #include "chrome/common/chrome_switches.h" |
| 41 #include "chrome/grit/generated_resources.h" | 40 #include "chrome/grit/generated_resources.h" |
| 42 #include "components/browser_sync/browser/profile_sync_service.h" | 41 #include "components/browser_sync/browser/profile_sync_service.h" |
| 42 #include "components/prefs/pref_service.h" |
| 43 #include "components/signin/core/browser/signin_error_controller.h" | 43 #include "components/signin/core/browser/signin_error_controller.h" |
| 44 #include "components/signin/core/browser/signin_header_helper.h" | 44 #include "components/signin/core/browser/signin_header_helper.h" |
| 45 #include "components/signin/core/browser/signin_metrics.h" | 45 #include "components/signin/core/browser/signin_metrics.h" |
| 46 #include "components/signin/core/common/profile_management_switches.h" | 46 #include "components/signin/core/common/profile_management_switches.h" |
| 47 #include "components/signin/core/common/signin_pref_names.h" | 47 #include "components/signin/core/common/signin_pref_names.h" |
| 48 #include "components/sync_driver/sync_prefs.h" | 48 #include "components/sync_driver/sync_prefs.h" |
| 49 #include "content/public/browser/render_view_host.h" | 49 #include "content/public/browser/render_view_host.h" |
| 50 #include "content/public/browser/web_contents.h" | 50 #include "content/public/browser/web_contents.h" |
| 51 #include "content/public/browser/web_contents_delegate.h" | 51 #include "content/public/browser/web_contents_delegate.h" |
| 52 #include "google_apis/gaia/gaia_auth_util.h" | 52 #include "google_apis/gaia/gaia_auth_util.h" |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 void PeopleHandler::UpdateSyncState() { | 1000 void PeopleHandler::UpdateSyncState() { |
| 1001 web_ui()->CallJavascriptFunction("settings.SyncPrivateApi.sendSyncStatus", | 1001 web_ui()->CallJavascriptFunction("settings.SyncPrivateApi.sendSyncStatus", |
| 1002 *GetSyncStateDictionary()); | 1002 *GetSyncStateDictionary()); |
| 1003 } | 1003 } |
| 1004 | 1004 |
| 1005 void PeopleHandler::OnSigninAllowedPrefChange() { | 1005 void PeopleHandler::OnSigninAllowedPrefChange() { |
| 1006 UpdateSyncState(); | 1006 UpdateSyncState(); |
| 1007 } | 1007 } |
| 1008 | 1008 |
| 1009 } // namespace settings | 1009 } // namespace settings |
| OLD | NEW |