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

Side by Side Diff: net/base/transport_security_state.cc

Issue 6393009: Add health.google.com to hardcoded STS list, with permission from the Health... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "net/base/transport_security_state.h" 5 #include "net/base/transport_security_state.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 {19, true, "\015sunshinepress\003org"}, 429 {19, true, "\015sunshinepress\003org"},
430 {21, false, "\003www\013noisebridge\003net"}, 430 {21, false, "\003www\013noisebridge\003net"},
431 {10, false, "\004neg9\003org"}, 431 {10, false, "\004neg9\003org"},
432 {12, true, "\006riseup\003net"}, 432 {12, true, "\006riseup\003net"},
433 {11, false, "\006factor\002cc"}, 433 {11, false, "\006factor\002cc"},
434 {22, false, "\007members\010mayfirst\003org"}, 434 {22, false, "\007members\010mayfirst\003org"},
435 {22, false, "\007support\010mayfirst\003org"}, 435 {22, false, "\007support\010mayfirst\003org"},
436 {17, false, "\002id\010mayfirst\003org"}, 436 {17, false, "\002id\010mayfirst\003org"},
437 {20, false, "\005lists\010mayfirst\003org"}, 437 {20, false, "\005lists\010mayfirst\003org"},
438 {19, true, "\015splendidbacon\003com"}, 438 {19, true, "\015splendidbacon\003com"},
439 {19, false, "\006health\006google\003com"},
439 }; 440 };
440 static const size_t kNumPreloadedSTS = ARRAYSIZE_UNSAFE(kPreloadedSTS); 441 static const size_t kNumPreloadedSTS = ARRAYSIZE_UNSAFE(kPreloadedSTS);
441 442
442 for (size_t i = 0; canonicalised_host[i]; i += canonicalised_host[i] + 1) { 443 for (size_t i = 0; canonicalised_host[i]; i += canonicalised_host[i] + 1) {
443 for (size_t j = 0; j < kNumPreloadedSTS; j++) { 444 for (size_t j = 0; j < kNumPreloadedSTS; j++) {
444 if (kPreloadedSTS[j].length == canonicalised_host.size() - i && 445 if (kPreloadedSTS[j].length == canonicalised_host.size() - i &&
445 (kPreloadedSTS[j].include_subdomains || i == 0) && 446 (kPreloadedSTS[j].include_subdomains || i == 0) &&
446 memcmp(kPreloadedSTS[j].dns_name, &canonicalised_host[i], 447 memcmp(kPreloadedSTS[j].dns_name, &canonicalised_host[i],
447 kPreloadedSTS[j].length) == 0) { 448 kPreloadedSTS[j].length) == 0) {
448 *include_subdomains = kPreloadedSTS[j].include_subdomains; 449 *include_subdomains = kPreloadedSTS[j].include_subdomains;
449 return true; 450 return true;
450 } 451 }
451 } 452 }
452 } 453 }
453 454
454 return false; 455 return false;
455 } 456 }
456 457
457 } // namespace 458 } // namespace
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