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

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

Issue 132353003: Do not prefill username when adding an account (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« 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/ui/webui/signin/inline_login_handler_impl.h" 5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 source == signin::SOURCE_AVATAR_BUBBLE_SIGN_IN) { 59 source == signin::SOURCE_AVATAR_BUBBLE_SIGN_IN) {
60 // Drop the leading slash in the path. 60 // Drop the leading slash in the path.
61 params.SetString("gaiaPath", 61 params.SetString("gaiaPath",
62 GaiaUrls::GetInstance()->embedded_signin_url().path().substr(1)); 62 GaiaUrls::GetInstance()->embedded_signin_url().path().substr(1));
63 } 63 }
64 64
65 params.SetString("service", "chromiumsync"); 65 params.SetString("service", "chromiumsync");
66 params.SetString("continueUrl", 66 params.SetString("continueUrl",
67 signin::GetLandingURL("source", static_cast<int>(source)).spec()); 67 signin::GetLandingURL("source", static_cast<int>(source)).spec());
68 68
69 std::string last_email = Profile::FromWebUI(web_ui())->GetPrefs()->GetString( 69 if (source != signin::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT) {
70 prefs::kGoogleServicesLastUsername); 70 std::string last_email = Profile::FromWebUI(web_ui())->GetPrefs()->
71 if (!last_email.empty()) 71 GetString(prefs::kGoogleServicesLastUsername);
72 params.SetString("email", last_email); 72 if (!last_email.empty())
73 params.SetString("email", last_email);
74 }
73 75
74 std::string frame_url; 76 std::string frame_url;
75 net::GetValueForKeyInQuery(current_url, "frameUrl", &frame_url); 77 net::GetValueForKeyInQuery(current_url, "frameUrl", &frame_url);
76 if (!frame_url.empty()) 78 if (!frame_url.empty())
77 params.SetString("frameUrl", frame_url); 79 params.SetString("frameUrl", frame_url);
78 80
79 std::string is_constrained; 81 std::string is_constrained;
80 net::GetValueForKeyInQuery(current_url, "constrained", &is_constrained); 82 net::GetValueForKeyInQuery(current_url, "constrained", &is_constrained);
81 if (!is_constrained.empty()) 83 if (!is_constrained.empty())
82 params.SetString("constrained", is_constrained); 84 params.SetString("constrained", is_constrained);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 TabStripModel* tab_strip_model = browser->tab_strip_model(); 265 TabStripModel* tab_strip_model = browser->tab_strip_model();
264 if (tab_strip_model) { 266 if (tab_strip_model) {
265 int index = tab_strip_model->GetIndexOfWebContents(tab); 267 int index = tab_strip_model->GetIndexOfWebContents(tab);
266 if (index != TabStripModel::kNoTab) { 268 if (index != TabStripModel::kNoTab) {
267 tab_strip_model->ExecuteContextMenuCommand( 269 tab_strip_model->ExecuteContextMenuCommand(
268 index, TabStripModel::CommandCloseTab); 270 index, TabStripModel::CommandCloseTab);
269 } 271 }
270 } 272 }
271 } 273 }
272 } 274 }
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