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

Side by Side Diff: chrome/browser/signin/signin_ui_util.cc

Issue 288813003: Add username of account that has an auth error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/signin/signin_ui_util.h" 5 #include "chrome/browser/signin/signin_ui_util.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
(...skipping 29 matching lines...) Expand all
40 40
41 std::vector<GlobalError*> GetSignedInServiceErrors(Profile* profile) { 41 std::vector<GlobalError*> GetSignedInServiceErrors(Profile* profile) {
42 std::vector<GlobalError*> errors; 42 std::vector<GlobalError*> errors;
43 // Chrome OS doesn't use SigninGlobalError or SyncGlobalError. Other platforms 43 // Chrome OS doesn't use SigninGlobalError or SyncGlobalError. Other platforms
44 // may use these services to show auth and sync errors in the toolbar menu. 44 // may use these services to show auth and sync errors in the toolbar menu.
45 #if !defined(OS_CHROMEOS) 45 #if !defined(OS_CHROMEOS)
46 // Auth errors have the highest priority - after that, individual service 46 // Auth errors have the highest priority - after that, individual service
47 // errors. 47 // errors.
48 SigninGlobalError* signin_error = 48 SigninGlobalError* signin_error =
49 SigninGlobalErrorFactory::GetForProfile(profile); 49 SigninGlobalErrorFactory::GetForProfile(profile);
50 if (signin_error && signin_error->HasMenuItem()) 50 if (signin_error && signin_error->HasError())
51 errors.push_back(signin_error); 51 errors.push_back(signin_error);
52 52
53 // No auth error - now try other services. Currently the list is just hard- 53 // No auth error - now try other services. Currently the list is just hard-
54 // coded but in the future if we add more we can create some kind of 54 // coded but in the future if we add more we can create some kind of
55 // registration framework. 55 // registration framework.
56 if (profile->IsSyncAccessible()) { 56 if (profile->IsSyncAccessible()) {
57 SyncGlobalError* error = SyncGlobalErrorFactory::GetForProfile(profile); 57 SyncGlobalError* error = SyncGlobalErrorFactory::GetForProfile(profile);
58 if (error && error->HasMenuItem()) 58 if (error && error->HasMenuItem())
59 errors.push_back(error); 59 errors.push_back(error);
60 } 60 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 default: 148 default:
149 if (status_label) { 149 if (status_label) {
150 status_label->assign(l10n_util::GetStringUTF16( 150 status_label->assign(l10n_util::GetStringUTF16(
151 IDS_SYNC_ERROR_SIGNING_IN)); 151 IDS_SYNC_ERROR_SIGNING_IN));
152 } 152 }
153 break; 153 break;
154 } 154 }
155 } 155 }
156 156
157 } // namespace signin_ui_util 157 } // namespace signin_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_global_error_unittest.cc ('k') | chrome/browser/sync/sync_ui_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698