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

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

Issue 111033005: Support experiment control of profile-management flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use ! instead of ^ to return desired state Created 6 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 | 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 "chrome/browser/extensions/extension_renderer_state.h" 7 #include "chrome/browser/extensions/extension_renderer_state.h"
8 #include "chrome/browser/profiles/profile_io_data.h" 8 #include "chrome/browser/profiles/profile_io_data.h"
9 #include "chrome/browser/tab_contents/tab_util.h" 9 #include "chrome/browser/tab_contents/tab_util.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return; 65 return;
66 } 66 }
67 67
68 // Only set the header for Gaia (in the mirror world) and Drive. Gaia needs 68 // Only set the header for Gaia (in the mirror world) and Drive. Gaia needs
69 // the header to redirect certain user actions to Chrome native UI. Drive 69 // the header to redirect certain user actions to Chrome native UI. Drive
70 // needs the header to tell if the current user is connected. The drive path 70 // needs the header to tell if the current user is connected. The drive path
71 // is a temporary workaround until the more generic chrome.principals API is 71 // is a temporary workaround until the more generic chrome.principals API is
72 // available. 72 // available.
73 const GURL& url = redirect_url.is_empty() ? request->url() : redirect_url; 73 const GURL& url = redirect_url.is_empty() ? request->url() : redirect_url;
74 GURL origin(url.GetOrigin()); 74 GURL origin(url.GetOrigin());
75 bool is_gaia_origin = switches::IsEnableInlineSignin() && 75 bool is_gaia_origin = !switches::IsEnableWebBasedSignin() &&
76 switches::IsNewProfileManagement() && 76 switches::IsNewProfileManagement() &&
77 gaia::IsGaiaSignonRealm(origin); 77 gaia::IsGaiaSignonRealm(origin);
78 if (!is_gaia_origin && !IsDriveOrigin(origin)) 78 if (!is_gaia_origin && !IsDriveOrigin(origin))
79 return; 79 return;
80 80
81 ExtensionRendererState* renderer_state = 81 ExtensionRendererState* renderer_state =
82 ExtensionRendererState::GetInstance(); 82 ExtensionRendererState::GetInstance();
83 ExtensionRendererState::WebViewInfo webview_info; 83 ExtensionRendererState::WebViewInfo webview_info;
84 bool is_guest = renderer_state->GetWebViewInfo( 84 bool is_guest = renderer_state->GetWebViewInfo(
85 child_id, route_id, &webview_info); 85 child_id, route_id, &webview_info);
(...skipping 20 matching lines...) Expand all
106 request->response_headers()->HasHeader(kChromeManageAccountsHeader)) { 106 request->response_headers()->HasHeader(kChromeManageAccountsHeader)) {
107 DCHECK(switches::IsNewProfileManagement() && 107 DCHECK(switches::IsNewProfileManagement() &&
108 !io_data->is_incognito()); 108 !io_data->is_incognito());
109 content::BrowserThread::PostTask( 109 content::BrowserThread::PostTask(
110 content::BrowserThread::UI, FROM_HERE, 110 content::BrowserThread::UI, FROM_HERE,
111 base::Bind(ShowAvatarBubbleUIThread, child_id, route_id)); 111 base::Bind(ShowAvatarBubbleUIThread, child_id, route_id));
112 } 112 }
113 } 113 }
114 114
115 } // namespace signin 115 } // namespace signin
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/signin_promo.cc » ('j') | chrome/common/profile_management_switches.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698