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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 599463002: Use base::StringPairs where appropriate from src/chrome/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing nit Created 6 years, 3 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
« no previous file with comments | « chrome/browser/profile_resetter/resettable_settings_snapshot.h ('k') | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/sync/one_click_signin_helper.h" 5 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 !google_chrome_signin_value.empty()) { 965 !google_chrome_signin_value.empty()) {
966 VLOG(1) << "OneClickSigninHelper::ShowInfoBarIfPossible:" 966 VLOG(1) << "OneClickSigninHelper::ShowInfoBarIfPossible:"
967 << " g-a-s='" << google_accounts_signin_value << "'" 967 << " g-a-s='" << google_accounts_signin_value << "'"
968 << " g-c-s='" << google_chrome_signin_value << "'"; 968 << " g-c-s='" << google_chrome_signin_value << "'";
969 } 969 }
970 970
971 if (!gaia::IsGaiaSignonRealm(request->url().GetOrigin())) 971 if (!gaia::IsGaiaSignonRealm(request->url().GetOrigin()))
972 return; 972 return;
973 973
974 // Parse Google-Accounts-SignIn. 974 // Parse Google-Accounts-SignIn.
975 std::vector<std::pair<std::string, std::string> > pairs; 975 base::StringPairs pairs;
976 base::SplitStringIntoKeyValuePairs(google_accounts_signin_value, '=', ',', 976 base::SplitStringIntoKeyValuePairs(google_accounts_signin_value, '=', ',',
977 &pairs); 977 &pairs);
978 std::string session_index; 978 std::string session_index;
979 std::string email; 979 std::string email;
980 for (size_t i = 0; i < pairs.size(); ++i) { 980 for (size_t i = 0; i < pairs.size(); ++i) {
981 const std::pair<std::string, std::string>& pair = pairs[i]; 981 const std::pair<std::string, std::string>& pair = pairs[i];
982 const std::string& key = pair.first; 982 const std::string& key = pair.first;
983 const std::string& value = pair.second; 983 const std::string& value = pair.second;
984 if (key == "email") { 984 if (key == "email") {
985 base::TrimString(value, "\"", &email); 985 base::TrimString(value, "\"", &email);
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 // If the web contents is showing a blank page and not about to be closed, 1597 // If the web contents is showing a blank page and not about to be closed,
1598 // redirect to the NTP or apps page. 1598 // redirect to the NTP or apps page.
1599 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) && 1599 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) &&
1600 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) { 1600 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) {
1601 RedirectToNtpOrAppsPage( 1601 RedirectToNtpOrAppsPage(
1602 web_contents(), 1602 web_contents(),
1603 signin::GetSourceForPromoURL(original_continue_url_)); 1603 signin::GetSourceForPromoURL(original_continue_url_));
1604 } 1604 }
1605 } 1605 }
1606 } 1606 }
OLDNEW
« no previous file with comments | « chrome/browser/profile_resetter/resettable_settings_snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698