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

Side by Side Diff: remoting/host/third_party_auth_config.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 | « ios/web/net/request_tracker_impl_unittest.mm ('k') | sync/internal_api/sync_manager_impl.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "remoting/host/third_party_auth_config.h" 5 #include "remoting/host/third_party_auth_config.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "policy/policy_constants.h" 9 #include "policy/policy_constants.h"
10 10
11 namespace remoting { 11 namespace remoting {
12 12
13 namespace { 13 namespace {
14 14
15 bool ParseUrlPolicy(const std::string& str, GURL* out) { 15 bool ParseUrlPolicy(const std::string& str, GURL* out) {
16 if (str.empty()) { 16 if (str.empty()) {
17 *out = GURL(); 17 *out = GURL();
18 return true; 18 return true;
19 } 19 }
20 20
21 GURL gurl(str); 21 GURL gurl(str);
22 if (!gurl.is_valid()) { 22 if (!gurl.is_valid()) {
23 LOG(ERROR) << "Not a valid URL: " << str; 23 LOG(ERROR) << "Not a valid URL: " << str;
24 return false; 24 return false;
25 } 25 }
26 // We validate https-vs-http only on Release builds to help with manual testing. 26 // We validate https-vs-http only on Release builds to help with manual testing.
27 #if defined(NDEBUG) 27 #if defined(NDEBUG)
28 if (!gurl.SchemeIsSecure()) { 28 if (!gurl.SchemeIsCryptographic()) {
29 LOG(ERROR) << "Not a secure URL: " << str; 29 LOG(ERROR) << "Not a secure URL: " << str;
30 return false; 30 return false;
31 } 31 }
32 #endif 32 #endif
33 33
34 *out = gurl; 34 *out = gurl;
35 return true; 35 return true;
36 } 36 }
37 37
38 } // namespace 38 } // namespace
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } else { 129 } else {
130 os << "TokenUrl = <" << cfg.token_url << ">, "; 130 os << "TokenUrl = <" << cfg.token_url << ">, ";
131 os << "TokenValidationUrl = <" << cfg.token_validation_url << ">, "; 131 os << "TokenValidationUrl = <" << cfg.token_validation_url << ">, ";
132 os << "TokenValidationCertificateIssuer = <" 132 os << "TokenValidationCertificateIssuer = <"
133 << cfg.token_validation_cert_issuer << ">"; 133 << cfg.token_validation_cert_issuer << ">";
134 } 134 }
135 return os; 135 return os;
136 } 136 }
137 137
138 } // namespace remoting 138 } // namespace remoting
OLDNEW
« no previous file with comments | « ios/web/net/request_tracker_impl_unittest.mm ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698