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

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

Issue 160363002: OneClickSigninHelper::CanOffer checks IsEnableWebBasedSignin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/password_manager/save_password_infobar_delegate.cc ('k') | no next file » | 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/tab_specific_content_settings.h" 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
10 #include "chrome/browser/extensions/tab_helper.h" 10 #include "chrome/browser/extensions/tab_helper.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" 21 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h"
22 #include "chrome/browser/translate/translate_tab_helper.h" 22 #include "chrome/browser/translate/translate_tab_helper.h"
23 #include "chrome/browser/ui/alternate_error_tab_observer.h" 23 #include "chrome/browser/ui/alternate_error_tab_observer.h"
24 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" 24 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h"
25 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 25 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
26 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 26 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
27 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 27 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
28 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 28 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
29 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 29 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
30 #include "chrome/common/chrome_switches.h" 30 #include "chrome/common/chrome_switches.h"
31 #include "chrome/common/profile_management_switches.h"
31 #include "components/autofill/content/browser/autofill_driver_impl.h" 32 #include "components/autofill/content/browser/autofill_driver_impl.h"
32 #include "components/autofill/core/browser/autofill_manager.h" 33 #include "components/autofill/core/browser/autofill_manager.h"
33 #include "content/public/browser/web_contents.h" 34 #include "content/public/browser/web_contents.h"
34 #include "extensions/browser/view_type_utils.h" 35 #include "extensions/browser/view_type_utils.h"
35 36
36 #if defined(OS_ANDROID) 37 #if defined(OS_ANDROID)
37 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" 38 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h"
38 #include "chrome/browser/ui/android/context_menu_helper.h" 39 #include "chrome/browser/ui/android/context_menu_helper.h"
39 #include "chrome/browser/ui/android/window_android_helper.h" 40 #include "chrome/browser/ui/android/window_android_helper.h"
40 #else 41 #else
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); 197 printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
197 #endif // defined(ENABLE_FULL_PRINTING) 198 #endif // defined(ENABLE_FULL_PRINTING)
198 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID) 199 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID)
199 200
200 #if defined(ENABLE_ONE_CLICK_SIGNIN) 201 #if defined(ENABLE_ONE_CLICK_SIGNIN)
201 // If this is not an incognito window, setup to handle one-click login. 202 // If this is not an incognito window, setup to handle one-click login.
202 // We don't want to check that the profile is already connected at this time 203 // We don't want to check that the profile is already connected at this time
203 // because the connected state may change while this tab is open. Having a 204 // because the connected state may change while this tab is open. Having a
204 // one-click signin helper attached does not cause problems if the profile 205 // one-click signin helper attached does not cause problems if the profile
205 // happens to be already connected. 206 // happens to be already connected.
206 if (OneClickSigninHelper::CanOffer(web_contents, 207 // TODO(vabr): The check IsEnableWebBasedSignin is a hack for the time when
208 // OneClickSignin is disabled. http://crbug.com/339804
209 if (switches::IsEnableWebBasedSignin() &&
Avi (use Gerrit) 2014/02/13 16:10:45 This, and other functions in profile_management_sw
vabr (Chromium) 2014/02/13 16:24:23 Thanks for the comment. I second that it is out of
210 OneClickSigninHelper::CanOffer(web_contents,
207 OneClickSigninHelper::CAN_OFFER_FOR_ALL, 211 OneClickSigninHelper::CAN_OFFER_FOR_ALL,
208 std::string(), 212 std::string(),
209 NULL)) { 213 NULL)) {
210 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( 214 OneClickSigninHelper::CreateForWebContentsWithPasswordManager(
211 web_contents, 215 web_contents,
212 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); 216 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents));
213 } 217 }
214 #endif 218 #endif
215 } 219 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/save_password_infobar_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698