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

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

Issue 597603003: Open continue url from gaia incognito header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | 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 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 "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/prefs/incognito_mode_prefs.h" 10 #include "chrome/browser/prefs/incognito_mode_prefs.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 #if !defined(OS_ANDROID) 134 #if !defined(OS_ANDROID)
135 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); 135 Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
136 if (browser) { 136 if (browser) {
137 BrowserWindow::AvatarBubbleMode bubble_mode; 137 BrowserWindow::AvatarBubbleMode bubble_mode;
138 switch (service_type) { 138 switch (service_type) {
139 case signin::GAIA_SERVICE_TYPE_INCOGNITO: 139 case signin::GAIA_SERVICE_TYPE_INCOGNITO:
140 chrome::NewIncognitoWindow(browser); 140 chrome::NewIncognitoWindow(browser);
141 return; 141 return;
142 case signin::GAIA_SERVICE_TYPE_ADDSESSION: 142 case signin::GAIA_SERVICE_TYPE_ADDSESSION:
143 bubble_mode = BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN; 143 bubble_mode = BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN;
Roger Tawa OOO till Jul 10th 2014/09/24 00:59:18 While you're here, fix this to be: AVATAR_BUBBLE_M
guohui 2014/09/24 18:16:53 Done.
144 break; 144 break;
145 case signin::GAIA_SERVICE_TYPE_REAUTH: 145 case signin::GAIA_SERVICE_TYPE_REAUTH:
146 bubble_mode = BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH; 146 bubble_mode = BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH;
147 break; 147 break;
148 default: 148 default:
149 bubble_mode = BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT; 149 bubble_mode = BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT;
150 } 150 }
151 browser->window()->ShowAvatarBubbleFromAvatarButton( 151 browser->window()->ShowAvatarBubbleFromAvatarButton(
152 bubble_mode, manage_accounts_params); 152 bubble_mode, manage_accounts_params);
153 } 153 }
154 #else // defined(OS_ANDROID) 154 #else // defined(OS_ANDROID)
155 if (service_type == signin::GAIA_SERVICE_TYPE_INCOGNITO) { 155 if (service_type == signin::GAIA_SERVICE_TYPE_INCOGNITO) {
156 GURL url(manage_accounts_params.continue_url.empty() ?
157 chrome::kChromeUINativeNewTabURL :
158 manage_accounts_params.continue_url);
156 web_contents->OpenURL(content::OpenURLParams( 159 web_contents->OpenURL(content::OpenURLParams(
157 GURL(chrome::kChromeUINativeNewTabURL), content::Referrer(), 160 url, content::Referrer(), OFF_THE_RECORD,
158 OFF_THE_RECORD, ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false)); 161 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false));
159 } else { 162 } else {
160 AccountManagementScreenHelper::OpenAccountManagementScreen( 163 AccountManagementScreenHelper::OpenAccountManagementScreen(
161 Profile::FromBrowserContext(web_contents->GetBrowserContext()), 164 Profile::FromBrowserContext(web_contents->GetBrowserContext()),
162 service_type); 165 service_type);
163 } 166 }
164 #endif // OS_ANDROID 167 #endif // OS_ANDROID
165 } 168 }
166 #endif // !defined(OS_IOS) 169 #endif // !defined(OS_IOS)
167 170
168 bool IsDriveOrigin(const GURL& url) { 171 bool IsDriveOrigin(const GURL& url) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 277
275 params.child_id = child_id; 278 params.child_id = child_id;
276 params.route_id = route_id; 279 params.route_id = route_id;
277 content::BrowserThread::PostTask( 280 content::BrowserThread::PostTask(
278 content::BrowserThread::UI, FROM_HERE, 281 content::BrowserThread::UI, FROM_HERE,
279 base::Bind(ProcessMirrorHeaderUIThread, child_id, route_id, params)); 282 base::Bind(ProcessMirrorHeaderUIThread, child_id, route_id, params));
280 #endif // defined(OS_IOS) 283 #endif // defined(OS_IOS)
281 } 284 }
282 285
283 } // namespace signin 286 } // namespace signin
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698