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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_handler.cc

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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/ui/webui/signin/inline_login_handler.h" 5 #include "chrome/browser/ui/webui/signin/inline_login_handler.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 if (!is_constrained.empty()) 221 if (!is_constrained.empty())
222 params.SetString(signin::kSignInPromoQueryKeyConstrained, is_constrained); 222 params.SetString(signin::kSignInPromoQueryKeyConstrained, is_constrained);
223 223
224 // TODO(rogerta): this needs to be passed on to gaia somehow. 224 // TODO(rogerta): this needs to be passed on to gaia somehow.
225 std::string read_only_email; 225 std::string read_only_email;
226 net::GetValueForKeyInQuery(current_url, "readOnlyEmail", &read_only_email); 226 net::GetValueForKeyInQuery(current_url, "readOnlyEmail", &read_only_email);
227 params.SetBoolean("readOnlyEmail", !read_only_email.empty()); 227 params.SetBoolean("readOnlyEmail", !read_only_email.empty());
228 228
229 SetExtraInitParams(params); 229 SetExtraInitParams(params);
230 230
231 web_ui()->CallJavascriptFunction("inline.login.loadAuthExtension", params); 231 web_ui()->CallJavascriptFunctionUnsafe("inline.login.loadAuthExtension",
232 params);
232 } 233 }
233 234
234 void InlineLoginHandler::HandleCompleteLoginMessage( 235 void InlineLoginHandler::HandleCompleteLoginMessage(
235 const base::ListValue* args) { 236 const base::ListValue* args) {
236 CompleteLogin(args); 237 CompleteLogin(args);
237 } 238 }
238 239
239 void InlineLoginHandler::HandleSwitchToFullTabMessage( 240 void InlineLoginHandler::HandleSwitchToFullTabMessage(
240 const base::ListValue* args) { 241 const base::ListValue* args) {
241 std::string url_str; 242 std::string url_str;
(...skipping 17 matching lines...) Expand all
259 main_frame_url = net::AppendOrReplaceQueryParameter( 260 main_frame_url = net::AppendOrReplaceQueryParameter(
260 main_frame_url, signin::kSignInPromoQueryKeyForceKeepData, "1"); 261 main_frame_url, signin::kSignInPromoQueryKeyForceKeepData, "1");
261 262
262 chrome::NavigateParams params( 263 chrome::NavigateParams params(
263 profile, 264 profile,
264 net::AppendOrReplaceQueryParameter( 265 net::AppendOrReplaceQueryParameter(
265 main_frame_url, signin::kSignInPromoQueryKeyConstrained, "0"), 266 main_frame_url, signin::kSignInPromoQueryKeyConstrained, "0"),
266 ui::PAGE_TRANSITION_AUTO_TOPLEVEL); 267 ui::PAGE_TRANSITION_AUTO_TOPLEVEL);
267 chrome::Navigate(&params); 268 chrome::Navigate(&params);
268 269
269 web_ui()->CallJavascriptFunction("inline.login.closeDialog"); 270 web_ui()->CallJavascriptFunctionUnsafe("inline.login.closeDialog");
270 } 271 }
271 272
272 void InlineLoginHandler::HandleNavigationButtonClicked( 273 void InlineLoginHandler::HandleNavigationButtonClicked(
273 const base::ListValue* args) { 274 const base::ListValue* args) {
274 Browser* browser = GetDesktopBrowser(web_ui()); 275 Browser* browser = GetDesktopBrowser(web_ui());
275 DCHECK(browser); 276 DCHECK(browser);
276 277
277 browser->signin_view_controller()->delegate()->PerformNavigation(); 278 browser->signin_view_controller()->delegate()->PerformNavigation();
278 } 279 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698