| 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/ui/sync/one_click_signin_sync_starter.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 | 11 |
| 12 #if defined(ENABLE_CONFIGURATION_POLICY) | 12 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 13 #include "chrome/browser/policy/cloud/user_policy_signin_service.h" | 13 #include "chrome/browser/policy/cloud/user_policy_signin_service.h" |
| 14 #include "chrome/browser/policy/cloud/user_policy_signin_service_factory.h" | 14 #include "chrome/browser/policy/cloud/user_policy_signin_service_factory.h" |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 18 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
| 19 #include "chrome/browser/profiles/profile_info_cache.h" | 19 #include "chrome/browser/profiles/profile_info_cache.h" |
| 20 #include "chrome/browser/profiles/profile_io_data.h" | 20 #include "chrome/browser/profiles/profile_io_data.h" |
| 21 #include "chrome/browser/profiles/profile_manager.h" | 21 #include "chrome/browser/profiles/profile_manager.h" |
| 22 #include "chrome/browser/profiles/profile_window.h" | 22 #include "chrome/browser/profiles/profile_window.h" |
| 23 #include "chrome/browser/signin/signin_manager_factory.h" | 23 #include "chrome/browser/signin/signin_manager_factory.h" |
| 24 #include "chrome/browser/signin/signin_tracker_factory.h" | 24 #include "chrome/browser/signin/signin_tracker_factory.h" |
| 25 #include "chrome/browser/sync/profile_sync_service.h" | |
| 26 #include "chrome/browser/sync/profile_sync_service_factory.h" | 25 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 27 #include "chrome/browser/ui/browser.h" | 26 #include "chrome/browser/ui/browser.h" |
| 28 #include "chrome/browser/ui/browser_finder.h" | 27 #include "chrome/browser/ui/browser_finder.h" |
| 29 #include "chrome/browser/ui/browser_list.h" | 28 #include "chrome/browser/ui/browser_list.h" |
| 30 #include "chrome/browser/ui/browser_tabstrip.h" | 29 #include "chrome/browser/ui/browser_tabstrip.h" |
| 31 #include "chrome/browser/ui/browser_window.h" | 30 #include "chrome/browser/ui/browser_window.h" |
| 32 #include "chrome/browser/ui/chrome_pages.h" | 31 #include "chrome/browser/ui/chrome_pages.h" |
| 33 #include "chrome/browser/ui/sync/one_click_signin_sync_observer.h" | 32 #include "chrome/browser/ui/sync/one_click_signin_sync_observer.h" |
| 34 #include "chrome/browser/ui/tab_dialogs.h" | 33 #include "chrome/browser/ui/tab_dialogs.h" |
| 35 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 34 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 36 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 35 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
| 37 #include "chrome/common/url_constants.h" | 36 #include "chrome/common/url_constants.h" |
| 38 #include "chrome/grit/chromium_strings.h" | 37 #include "chrome/grit/chromium_strings.h" |
| 39 #include "chrome/grit/generated_resources.h" | 38 #include "chrome/grit/generated_resources.h" |
| 39 #include "components/browser_sync/browser/profile_sync_service.h" |
| 40 #include "components/signin/core/browser/signin_manager.h" | 40 #include "components/signin/core/browser/signin_manager.h" |
| 41 #include "components/signin/core/browser/signin_metrics.h" | 41 #include "components/signin/core/browser/signin_metrics.h" |
| 42 #include "components/sync_driver/sync_prefs.h" | 42 #include "components/sync_driver/sync_prefs.h" |
| 43 #include "net/url_request/url_request_context_getter.h" | 43 #include "net/url_request/url_request_context_getter.h" |
| 44 #include "ui/base/l10n/l10n_util.h" | 44 #include "ui/base/l10n/l10n_util.h" |
| 45 | 45 |
| 46 namespace { | 46 namespace { |
| 47 | 47 |
| 48 // UMA histogram for tracking what users do when presented with the signin | 48 // UMA histogram for tracking what users do when presented with the signin |
| 49 // screen. | 49 // screen. |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 false /* user_gesture */); | 605 false /* user_gesture */); |
| 606 } | 606 } |
| 607 | 607 |
| 608 void OneClickSigninSyncStarter::LoadContinueUrl() { | 608 void OneClickSigninSyncStarter::LoadContinueUrl() { |
| 609 web_contents()->GetController().LoadURL( | 609 web_contents()->GetController().LoadURL( |
| 610 continue_url_, | 610 continue_url_, |
| 611 content::Referrer(), | 611 content::Referrer(), |
| 612 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, | 612 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 613 std::string()); | 613 std::string()); |
| 614 } | 614 } |
| OLD | NEW |