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

Side by Side Diff: google_apis/gaia/gaia_auth_util.cc

Issue 1136643004: Switch remaining functions from SchemeIsSecure() to SchemeIsCryptographic(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing. Created 5 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
« no previous file with comments | « extensions/browser/updater/extension_downloader.cc ('k') | ios/web/net/request_tracker_impl.mm » ('j') | 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 "google_apis/gaia/gaia_auth_util.h" 5 #include "google_apis/gaia/gaia_auth_util.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 std::string email = CanonicalizeEmail(email_address); 79 std::string email = CanonicalizeEmail(email_address);
80 size_t separator_pos = email.find('@'); 80 size_t separator_pos = email.find('@');
81 if (separator_pos != email.npos && separator_pos < email.length() - 1) 81 if (separator_pos != email.npos && separator_pos < email.length() - 1)
82 return email.substr(separator_pos + 1); 82 return email.substr(separator_pos + 1);
83 else 83 else
84 NOTREACHED() << "Not a proper email address: " << email; 84 NOTREACHED() << "Not a proper email address: " << email;
85 return std::string(); 85 return std::string();
86 } 86 }
87 87
88 bool IsGaiaSignonRealm(const GURL& url) { 88 bool IsGaiaSignonRealm(const GURL& url) {
89 if (!url.SchemeIsSecure()) 89 if (!url.SchemeIsCryptographic())
90 return false; 90 return false;
91 91
92 return url == GaiaUrls::GetInstance()->gaia_url(); 92 return url == GaiaUrls::GetInstance()->gaia_url();
93 } 93 }
94 94
95 95
96 bool ParseListAccountsData( 96 bool ParseListAccountsData(
97 const std::string& data, 97 const std::string& data,
98 std::vector<std::pair<std::string, bool> >* accounts) { 98 std::vector<std::pair<std::string, bool> >* accounts) {
99 accounts->clear(); 99 accounts->clear();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 accounts->push_back( 131 accounts->push_back(
132 std::make_pair(CanonicalizeEmail(email), is_email_valid != 0)); 132 std::make_pair(CanonicalizeEmail(email), is_email_valid != 0));
133 } 133 }
134 } 134 }
135 } 135 }
136 136
137 return true; 137 return true;
138 } 138 }
139 139
140 } // namespace gaia 140 } // namespace gaia
OLDNEW
« no previous file with comments | « extensions/browser/updater/extension_downloader.cc ('k') | ios/web/net/request_tracker_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698