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

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

Issue 288493008: UMA Metrics for the user menu, including vasquette-detection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit - make a member variable const 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 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/signin/signin_header_helper.h" 5 #include "chrome/browser/signin/signin_header_helper.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "chrome/browser/google/google_util.h" 8 #include "chrome/browser/google/google_util.h"
9 #include "chrome/browser/prefs/incognito_mode_prefs.h" 9 #include "chrome/browser/prefs/incognito_mode_prefs.h"
10 #include "chrome/browser/profiles/profile_io_data.h" 10 #include "chrome/browser/profiles/profile_io_data.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 if (!web_contents) 43 if (!web_contents)
44 return; 44 return;
45 45
46 #if !defined(OS_ANDROID) 46 #if !defined(OS_ANDROID)
47 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); 47 Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
48 if (browser) { 48 if (browser) {
49 if (header_value == kGaiaSignoutOptionsIncognito) { 49 if (header_value == kGaiaSignoutOptionsIncognito) {
50 chrome::NewIncognitoWindow(browser); 50 chrome::NewIncognitoWindow(browser);
51 } else { 51 } else {
52 browser->window()->ShowAvatarBubbleFromAvatarButton( 52 browser->window()->ShowAvatarBubbleFromAvatarButton(
53 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT); 53 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT_FROM_HEADER);
54 } 54 }
55 } 55 }
56 #else // defined(OS_ANDROID) 56 #else // defined(OS_ANDROID)
57 if (header_value == kGaiaSignoutOptionsIncognito) { 57 if (header_value == kGaiaSignoutOptionsIncognito) {
58 web_contents->OpenURL(content::OpenURLParams( 58 web_contents->OpenURL(content::OpenURLParams(
59 GURL(chrome::kChromeUINativeNewTabURL), content::Referrer(), 59 GURL(chrome::kChromeUINativeNewTabURL), content::Referrer(),
60 OFF_THE_RECORD, content::PAGE_TRANSITION_AUTO_TOPLEVEL, false)); 60 OFF_THE_RECORD, content::PAGE_TRANSITION_AUTO_TOPLEVEL, false));
61 } else { 61 } else {
62 AccountManagementScreenHelper::OpenAccountManagementScreen( 62 AccountManagementScreenHelper::OpenAccountManagementScreen(
63 Profile::FromBrowserContext(web_contents->GetBrowserContext())); 63 Profile::FromBrowserContext(web_contents->GetBrowserContext()));
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 DCHECK(switches::IsNewProfileManagement() && 139 DCHECK(switches::IsNewProfileManagement() &&
140 !io_data->IsOffTheRecord()); 140 !io_data->IsOffTheRecord());
141 content::BrowserThread::PostTask( 141 content::BrowserThread::PostTask(
142 content::BrowserThread::UI, FROM_HERE, 142 content::BrowserThread::UI, FROM_HERE,
143 base::Bind(ProcessMirrorHeaderUIThread, child_id, route_id, 143 base::Bind(ProcessMirrorHeaderUIThread, child_id, route_id,
144 header_value)); 144 header_value));
145 } 145 }
146 } 146 }
147 147
148 } // namespace signin 148 } // namespace signin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698