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

Unified Diff: chrome/browser/ui/webui/signin/inline_login_ui.cc

Issue 1412453002: Remove enable-iframe-based-signin flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed uneeded code Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/signin/inline_login_ui.cc
diff --git a/chrome/browser/ui/webui/signin/inline_login_ui.cc b/chrome/browser/ui/webui/signin/inline_login_ui.cc
index 37490232a29b1511621fc342d78aa322333318c7..9391173862ea590fabe47323de5ffaeafd176834 100644
--- a/chrome/browser/ui/webui/signin/inline_login_ui.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_ui.cc
@@ -62,9 +62,7 @@ content::WebUIDataSource* CreateWebUIDataSource() {
source->OverrideContentSecurityPolicyObjectSrc("object-src *;");
source->SetJsonPath("strings.js");
- bool is_webview_signin_enabled = switches::IsEnableWebviewBasedSignin();
- source->SetDefaultResource(is_webview_signin_enabled ?
- IDR_NEW_INLINE_LOGIN_HTML : IDR_INLINE_LOGIN_HTML);
+ source->SetDefaultResource(IDR_NEW_INLINE_LOGIN_HTML);
// Only add a filter when runing as test.
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
@@ -75,25 +73,12 @@ content::WebUIDataSource* CreateWebUIDataSource() {
source->AddResourcePath("inline_login.css", IDR_INLINE_LOGIN_CSS);
source->AddResourcePath("inline_login.js", IDR_INLINE_LOGIN_JS);
- source->AddResourcePath("gaia_auth_host.js", is_webview_signin_enabled ?
- IDR_GAIA_AUTH_AUTHENTICATOR_JS : IDR_GAIA_AUTH_HOST_JS);
+ source->AddResourcePath("gaia_auth_host.js", IDR_GAIA_AUTH_AUTHENTICATOR_JS);
source->AddLocalizedString("title", IDS_CHROME_SIGNIN_TITLE);
return source;
}
-void AddToSetIfIsAuthIframe(std::set<content::RenderFrameHost*>* frame_set,
- const GURL& parent_origin,
- const std::string& parent_frame_name,
- content::RenderFrameHost* frame) {
- content::RenderFrameHost* parent = frame->GetParent();
- if (parent && parent->GetFrameName() == parent_frame_name &&
- (parent_origin.is_empty() ||
- parent->GetLastCommittedURL().GetOrigin() == parent_origin)) {
- frame_set->insert(frame);
- }
-}
-
bool AddToSetIfSigninWebview(std::set<content::RenderFrameHost*>* frame_set,
const std::string& web_view_name,
content::WebContents* web_contents) {
@@ -137,23 +122,13 @@ content::RenderFrameHost* InlineLoginUI::GetAuthFrame(
const GURL& parent_origin,
const std::string& parent_frame_name) {
std::set<content::RenderFrameHost*> frame_set;
- bool is_webview = switches::IsEnableWebviewBasedSignin();
-#if defined(OS_CHROMEOS)
- is_webview = is_webview || chromeos::StartupUtils::IsWebviewSigninEnabled();
-#endif
- if (is_webview) {
- guest_view::GuestViewManager* manager =
- guest_view::GuestViewManager::FromBrowserContext(
- web_contents->GetBrowserContext());
- if (manager) {
- manager->ForEachGuest(
- web_contents,
- base::Bind(&AddToSetIfSigninWebview, &frame_set, parent_frame_name));
- }
- } else {
- web_contents->ForEachFrame(
- base::Bind(&AddToSetIfIsAuthIframe, &frame_set,
- parent_origin, parent_frame_name));
+ guest_view::GuestViewManager* manager =
achuithb 2015/12/15 18:43:17 I think auto may be more readable here?
Roger Tawa OOO till Jul 10th 2015/12/15 19:23:41 Done.
+ guest_view::GuestViewManager::FromBrowserContext(
+ web_contents->GetBrowserContext());
+ if (manager) {
+ manager->ForEachGuest(
+ web_contents,
+ base::Bind(&AddToSetIfSigninWebview, &frame_set, parent_frame_name));
achuithb 2015/12/15 18:43:17 Should this be renamed to AddToFrameSet or somethi
Roger Tawa OOO till Jul 10th 2015/12/15 19:23:41 Yes makes sense. Done.
}
DCHECK_GE(1U, frame_set.size());
if (!frame_set.empty())

Powered by Google App Engine
This is Rietveld 408576698