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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 809313009: Make the SigninErrorController a PKS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Copyrighted: 2015 Created 5 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/signin/inline_login_handler_impl.h" 5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/profiles/profile_window.h" 15 #include "chrome/browser/profiles/profile_window.h"
16 #include "chrome/browser/signin/about_signin_internals_factory.h" 16 #include "chrome/browser/signin/about_signin_internals_factory.h"
17 #include "chrome/browser/signin/account_tracker_service_factory.h" 17 #include "chrome/browser/signin/account_tracker_service_factory.h"
18 #include "chrome/browser/signin/chrome_signin_client_factory.h" 18 #include "chrome/browser/signin/chrome_signin_client_factory.h"
19 #include "chrome/browser/signin/local_auth.h" 19 #include "chrome/browser/signin/local_auth.h"
20 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 20 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
21 #include "chrome/browser/signin/signin_error_controller_factory.h"
21 #include "chrome/browser/signin/signin_manager_factory.h" 22 #include "chrome/browser/signin/signin_manager_factory.h"
22 #include "chrome/browser/signin/signin_promo.h" 23 #include "chrome/browser/signin/signin_promo.h"
23 #include "chrome/browser/sync/profile_sync_service.h" 24 #include "chrome/browser/sync/profile_sync_service.h"
24 #include "chrome/browser/sync/profile_sync_service_factory.h" 25 #include "chrome/browser/sync/profile_sync_service_factory.h"
25 #include "chrome/browser/ui/browser_finder.h" 26 #include "chrome/browser/ui/browser_finder.h"
26 #include "chrome/browser/ui/browser_window.h" 27 #include "chrome/browser/ui/browser_window.h"
27 #include "chrome/browser/ui/sync/one_click_signin_helper.h" 28 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
28 #include "chrome/browser/ui/tabs/tab_strip_model.h" 29 #include "chrome/browser/ui/tabs/tab_strip_model.h"
29 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" 30 #include "chrome/browser/ui/webui/signin/inline_login_ui.h"
30 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 31 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 base::MessageLoop::current()->PostTask( 154 base::MessageLoop::current()->PostTask(
154 FROM_HERE, 155 FROM_HERE,
155 base::Bind(&InlineLoginHandlerImpl::CloseTab, 156 base::Bind(&InlineLoginHandlerImpl::CloseTab,
156 handler_, 157 handler_,
157 signin::ShouldShowAccountManagement(current_url_))); 158 signin::ShouldShowAccountManagement(current_url_)));
158 } 159 }
159 } else { 160 } else {
160 ProfileSyncService* sync_service = 161 ProfileSyncService* sync_service =
161 ProfileSyncServiceFactory::GetForProfile(profile_); 162 ProfileSyncServiceFactory::GetForProfile(profile_);
162 SigninErrorController* error_controller = 163 SigninErrorController* error_controller =
163 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)-> 164 SigninErrorControllerFactory::GetForProfile(profile_);
164 signin_error_controller();
165 165
166 bool is_new_avatar_menu = switches::IsNewAvatarMenu(); 166 bool is_new_avatar_menu = switches::IsNewAvatarMenu();
167 167
168 OneClickSigninSyncStarter::StartSyncMode start_mode; 168 OneClickSigninSyncStarter::StartSyncMode start_mode;
169 if (source == signin_metrics::SOURCE_SETTINGS || choose_what_to_sync_) { 169 if (source == signin_metrics::SOURCE_SETTINGS || choose_what_to_sync_) {
170 bool show_settings_without_configure = 170 bool show_settings_without_configure =
171 error_controller->HasError() && 171 error_controller->HasError() &&
172 sync_service && 172 sync_service &&
173 sync_service->HasSyncSetupCompleted(); 173 sync_service->HasSyncSetupCompleted();
174 start_mode = show_settings_without_configure ? 174 start_mode = show_settings_without_configure ?
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } 451 }
452 } 452 }
453 453
454 if (show_account_management) { 454 if (show_account_management) {
455 browser->window()->ShowAvatarBubbleFromAvatarButton( 455 browser->window()->ShowAvatarBubbleFromAvatarButton(
456 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, 456 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT,
457 signin::ManageAccountsParams()); 457 signin::ManageAccountsParams());
458 } 458 }
459 } 459 }
460 } 460 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698