Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/ui/webui/signin/inline_login_handler_impl.h" | 5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 return; | 219 return; |
| 220 | 220 |
| 221 // Returns early if this is not a gaia iframe navigation. | 221 // Returns early if this is not a gaia iframe navigation. |
| 222 const GURL kGaiaExtOrigin( | 222 const GURL kGaiaExtOrigin( |
| 223 "chrome-extension://mfffpogegjflfpflabcdkioaeobkgjik/"); | 223 "chrome-extension://mfffpogegjflfpflabcdkioaeobkgjik/"); |
| 224 content::RenderFrameHost* gaia_iframe = InlineLoginUI::GetAuthIframe( | 224 content::RenderFrameHost* gaia_iframe = InlineLoginUI::GetAuthIframe( |
| 225 web_contents(), kGaiaExtOrigin, "signin-frame"); | 225 web_contents(), kGaiaExtOrigin, "signin-frame"); |
| 226 if (render_frame_host != gaia_iframe) | 226 if (render_frame_host != gaia_iframe) |
| 227 return; | 227 return; |
| 228 | 228 |
| 229 // Loading any untrusted (e.g., HTTP) URLs in the privileged sign-in process | 229 if (!url.is_empty()) { |
|
Charlie Reis
2014/07/24 18:14:38
Looks like you're changing the actual fix. How do
guohui
2014/07/24 18:31:21
This CL changes the continue URL (from https://www
Charlie Reis
2014/07/24 18:47:11
Works for me, but please leave the explanatory com
guohui
2014/07/24 19:37:18
Done.
| |
| 230 // will require confirmation before the sign in takes effect. | 230 GURL origin(url.GetOrigin()); |
| 231 if (url.spec() != url::kAboutBlankURL && | 231 if (url.spec() != url::kAboutBlankURL && |
| 232 !gaia::IsGaiaSignonRealm(url.GetOrigin()) && | 232 origin != kGaiaExtOrigin && |
| 233 !signin::IsContinueUrlForWebBasedSigninFlow(url)) { | 233 !gaia::IsGaiaSignonRealm(origin)) { |
| 234 confirm_untrusted_signin_ = true; | 234 confirm_untrusted_signin_ = true; |
| 235 } | |
| 235 } | 236 } |
| 236 } | 237 } |
| 237 | 238 |
| 238 void InlineLoginHandlerImpl::SetExtraInitParams(base::DictionaryValue& params) { | 239 void InlineLoginHandlerImpl::SetExtraInitParams(base::DictionaryValue& params) { |
| 239 params.SetString("service", "chromiumsync"); | 240 params.SetString("service", "chromiumsync"); |
| 240 | 241 |
| 241 content::WebContents* contents = web_ui()->GetWebContents(); | 242 content::WebContents* contents = web_ui()->GetWebContents(); |
| 242 const GURL& current_url = contents->GetURL(); | 243 const GURL& current_url = contents->GetURL(); |
| 243 std::string is_constrained; | 244 std::string is_constrained; |
| 244 net::GetValueForKeyInQuery(current_url, "constrained", &is_constrained); | 245 net::GetValueForKeyInQuery(current_url, "constrained", &is_constrained); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 423 } | 424 } |
| 424 } | 425 } |
| 425 | 426 |
| 426 if (show_account_management) { | 427 if (show_account_management) { |
| 427 browser->window()->ShowAvatarBubbleFromAvatarButton( | 428 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 428 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, | 429 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, |
| 429 signin::ManageAccountsParams()); | 430 signin::ManageAccountsParams()); |
| 430 } | 431 } |
| 431 } | 432 } |
| 432 } | 433 } |
| OLD | NEW |