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

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

Issue 813133003: New Profile metric for Auth Errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pre-review cleanup Created 6 years 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 (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_global_error.h" 5 #include "chrome/browser/signin/signin_global_error.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/profiles/profile_info_cache.h"
12 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/signin/signin_header_helper.h" 13 #include "chrome/browser/signin/signin_header_helper.h"
11 #include "chrome/browser/signin/signin_manager_factory.h" 14 #include "chrome/browser/signin/signin_manager_factory.h"
12 #include "chrome/browser/ui/browser_commands.h" 15 #include "chrome/browser/ui/browser_commands.h"
13 #include "chrome/browser/ui/browser_window.h" 16 #include "chrome/browser/ui/browser_window.h"
14 #include "chrome/browser/ui/chrome_pages.h" 17 #include "chrome/browser/ui/chrome_pages.h"
15 #include "chrome/browser/ui/global_error/global_error_service.h" 18 #include "chrome/browser/ui/global_error/global_error_service.h"
16 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 19 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
17 #include "chrome/browser/ui/singleton_tabs.h" 20 #include "chrome/browser/ui/singleton_tabs.h"
18 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 21 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
19 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 22 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void SigninGlobalError::BubbleViewAcceptButtonPressed(Browser* browser) { 184 void SigninGlobalError::BubbleViewAcceptButtonPressed(Browser* browser) {
182 ExecuteMenuItem(browser); 185 ExecuteMenuItem(browser);
183 } 186 }
184 187
185 void SigninGlobalError::BubbleViewCancelButtonPressed(Browser* browser) { 188 void SigninGlobalError::BubbleViewCancelButtonPressed(Browser* browser) {
186 NOTREACHED(); 189 NOTREACHED();
187 } 190 }
188 191
189 void SigninGlobalError::OnErrorChanged() { 192 void SigninGlobalError::OnErrorChanged() {
190 GlobalErrorServiceFactory::GetForProfile(profile_)->NotifyErrorsChanged(this); 193 GlobalErrorServiceFactory::GetForProfile(profile_)->NotifyErrorsChanged(this);
194
195 ProfileInfoCache& cache = g_browser_process->profile_manager()->
196 GetProfileInfoCache();
197 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath());
198 if (index != std::string::npos) {
199 cache.SetProfileAuthErrorAtIndex(index,
200 error_controller_->auth_error().state());
201 }
Roger Tawa OOO till Jul 10th 2014/12/19 19:52:33 Why not just call UMA_HISTOGRAM_ENUMERATION right
Mike Lerman 2015/01/05 20:24:02 The answer to the first two questions is the same:
191 } 202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698