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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "chrome/browser/ui/browser_finder.h" | 28 #include "chrome/browser/ui/browser_finder.h" |
29 #include "chrome/browser/ui/browser_list.h" | 29 #include "chrome/browser/ui/browser_list.h" |
30 #include "chrome/browser/ui/browser_navigator.h" | 30 #include "chrome/browser/ui/browser_navigator.h" |
31 #include "chrome/browser/ui/browser_tabstrip.h" | 31 #include "chrome/browser/ui/browser_tabstrip.h" |
32 #include "chrome/browser/ui/browser_window.h" | 32 #include "chrome/browser/ui/browser_window.h" |
33 #include "chrome/browser/ui/chrome_pages.h" | 33 #include "chrome/browser/ui/chrome_pages.h" |
34 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 34 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
35 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 35 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
36 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 36 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
37 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h" | 37 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h" |
38 #include "chrome/common/profile_management_switches.h" | |
39 #include "chrome/common/url_constants.h" | 38 #include "chrome/common/url_constants.h" |
40 #include "components/signin/core/browser/signin_manager.h" | 39 #include "components/signin/core/browser/signin_manager.h" |
| 40 #include "components/signin/core/common/profile_management_switches.h" |
41 #include "components/sync_driver/sync_prefs.h" | 41 #include "components/sync_driver/sync_prefs.h" |
42 #include "grit/chromium_strings.h" | 42 #include "grit/chromium_strings.h" |
43 #include "grit/generated_resources.h" | 43 #include "grit/generated_resources.h" |
44 #include "ui/base/l10n/l10n_util.h" | 44 #include "ui/base/l10n/l10n_util.h" |
45 #include "ui/base/resource/resource_bundle.h" | 45 #include "ui/base/resource/resource_bundle.h" |
46 | 46 |
47 OneClickSigninSyncStarter::OneClickSigninSyncStarter( | 47 OneClickSigninSyncStarter::OneClickSigninSyncStarter( |
48 Profile* profile, | 48 Profile* profile, |
49 Browser* browser, | 49 Browser* browser, |
50 const std::string& email, | 50 const std::string& email, |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 false); | 518 false); |
519 contents->OpenURL(params); | 519 contents->OpenURL(params); |
520 | 520 |
521 // Activate the tab. | 521 // Activate the tab. |
522 Browser* browser = chrome::FindBrowserWithWebContents(contents); | 522 Browser* browser = chrome::FindBrowserWithWebContents(contents); |
523 int content_index = | 523 int content_index = |
524 browser->tab_strip_model()->GetIndexOfWebContents(contents); | 524 browser->tab_strip_model()->GetIndexOfWebContents(contents); |
525 browser->tab_strip_model()->ActivateTabAt(content_index, | 525 browser->tab_strip_model()->ActivateTabAt(content_index, |
526 false /* user_gesture */); | 526 false /* user_gesture */); |
527 } | 527 } |
OLD | NEW |