Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: chrome/browser/ui/tab_helpers.cc

Issue 872433006: Disconnect one click sign in code. The code itself will be removed in followup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/tab_helpers.h" 5 #include "chrome/browser/ui/tab_helpers.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/content_settings/chrome_content_settings_client.h" 9 #include "chrome/browser/content_settings/chrome_content_settings_client.h"
10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
(...skipping 18 matching lines...) Expand all
29 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" 29 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h"
30 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 30 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
31 #include "chrome/browser/ui/search/search_tab_helper.h" 31 #include "chrome/browser/ui/search/search_tab_helper.h"
32 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 32 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
33 #include "chrome/browser/ui/tab_dialogs.h" 33 #include "chrome/browser/ui/tab_dialogs.h"
34 #include "chrome/common/chrome_switches.h" 34 #include "chrome/common/chrome_switches.h"
35 #include "components/autofill/content/browser/content_autofill_driver_factory.h" 35 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
36 #include "components/autofill/core/browser/autofill_manager.h" 36 #include "components/autofill/core/browser/autofill_manager.h"
37 #include "components/dom_distiller/content/web_contents_main_frame_observer.h" 37 #include "components/dom_distiller/content/web_contents_main_frame_observer.h"
38 #include "components/password_manager/core/browser/password_manager.h" 38 #include "components/password_manager/core/browser/password_manager.h"
39 #include "components/signin/core/common/profile_management_switches.h"
40 #include "content/public/browser/web_contents.h" 39 #include "content/public/browser/web_contents.h"
41 40
42 #if defined(OS_ANDROID) 41 #if defined(OS_ANDROID)
43 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" 42 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h"
44 #include "chrome/browser/enhanced_bookmarks/android/enhanced_bookmark_tab_helper .h" 43 #include "chrome/browser/enhanced_bookmarks/android/enhanced_bookmark_tab_helper .h"
45 #include "chrome/browser/ui/android/context_menu_helper.h" 44 #include "chrome/browser/ui/android/context_menu_helper.h"
46 #include "chrome/browser/ui/android/window_android_helper.h" 45 #include "chrome/browser/ui/android/window_android_helper.h"
47 #else 46 #else
48 #include "chrome/browser/external_protocol/external_protocol_observer.h" 47 #include "chrome/browser/external_protocol/external_protocol_observer.h"
49 #include "chrome/browser/plugins/plugin_observer.h" 48 #include "chrome/browser/plugins/plugin_observer.h"
(...skipping 30 matching lines...) Expand all
80 79
81 #if defined(ENABLE_PRINTING) 80 #if defined(ENABLE_PRINTING)
82 #if defined(ENABLE_PRINT_PREVIEW) 81 #if defined(ENABLE_PRINT_PREVIEW)
83 #include "chrome/browser/printing/print_preview_message_handler.h" 82 #include "chrome/browser/printing/print_preview_message_handler.h"
84 #include "chrome/browser/printing/print_view_manager.h" 83 #include "chrome/browser/printing/print_view_manager.h"
85 #else 84 #else
86 #include "chrome/browser/printing/print_view_manager_basic.h" 85 #include "chrome/browser/printing/print_view_manager_basic.h"
87 #endif // defined(ENABLE_PRINT_PREVIEW) 86 #endif // defined(ENABLE_PRINT_PREVIEW)
88 #endif // defined(ENABLE_PRINTING) 87 #endif // defined(ENABLE_PRINTING)
89 88
90 #if defined(ENABLE_ONE_CLICK_SIGNIN)
91 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
92 #endif
93
94 using content::WebContents; 89 using content::WebContents;
95 90
96 namespace { 91 namespace {
97 92
98 const char kTabContentsAttachedTabHelpersUserDataKey[] = 93 const char kTabContentsAttachedTabHelpersUserDataKey[] =
99 "TabContentsAttachedTabHelpers"; 94 "TabContentsAttachedTabHelpers";
100 95
101 } // namespace 96 } // namespace
102 97
103 // static 98 // static
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); 209 printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
215 #endif // defined(ENABLE_PRINT_PREVIEW) 210 #endif // defined(ENABLE_PRINT_PREVIEW)
216 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID) 211 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID)
217 212
218 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 213 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
219 switches::kEnableDomDistiller)) { 214 switches::kEnableDomDistiller)) {
220 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( 215 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents(
221 web_contents); 216 web_contents);
222 } 217 }
223 218
224 #if defined(ENABLE_ONE_CLICK_SIGNIN)
225 // If this is not an incognito window, setup to handle one-click login.
226 // We don't want to check that the profile is already connected at this time
227 // because the connected state may change while this tab is open. Having a
228 // one-click signin helper attached does not cause problems if the profile
229 // happens to be already connected.
230 if (switches::IsEnableWebBasedSignin() &&
231 OneClickSigninHelper::CanOffer(web_contents,
232 OneClickSigninHelper::CAN_OFFER_FOR_ALL,
233 std::string(),
234 NULL)) {
235 OneClickSigninHelper::CreateForWebContents(web_contents);
236 }
237 #endif
238
239 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( 219 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile(
240 web_contents->GetBrowserContext())) { 220 web_contents->GetBrowserContext())) {
241 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( 221 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents(
242 web_contents); 222 web_contents);
243 } 223 }
244 } 224 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698