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

Side by Side Diff: net/cert/x509_cert_types.cc

Issue 2901103002: Fix closing namespace comments in //net. (Closed)
Patch Set: Rebase. Created 3 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 | « net/cert/nss_profile_filter_chromeos_unittest.cc ('k') | net/cert/x509_util_android.h » ('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 "net/cert/x509_cert_types.h" 5 #include "net/cert/x509_cert_types.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 11 matching lines...) Expand all
22 // |*ok| is set to false if there is an error in parsing the number, but left 22 // |*ok| is set to false if there is an error in parsing the number, but left
23 // untouched otherwise. Returns the parsed integer. 23 // untouched otherwise. Returns the parsed integer.
24 int ParseIntAndAdvance(const char** field, size_t field_len, bool* ok) { 24 int ParseIntAndAdvance(const char** field, size_t field_len, bool* ok) {
25 int result = 0; 25 int result = 0;
26 *ok &= ParseInt32(base::StringPiece(*field, field_len), 26 *ok &= ParseInt32(base::StringPiece(*field, field_len),
27 ParseIntFormat::NON_NEGATIVE, &result); 27 ParseIntFormat::NON_NEGATIVE, &result);
28 *field += field_len; 28 *field += field_len;
29 return result; 29 return result;
30 } 30 }
31 31
32 } 32 } // anonymous namespace
33 33
34 CertPrincipal::CertPrincipal() { 34 CertPrincipal::CertPrincipal() {
35 } 35 }
36 36
37 CertPrincipal::CertPrincipal(const std::string& name) : common_name(name) {} 37 CertPrincipal::CertPrincipal(const std::string& name) : common_name(name) {}
38 38
39 CertPrincipal::~CertPrincipal() { 39 CertPrincipal::~CertPrincipal() {
40 } 40 }
41 41
42 std::string CertPrincipal::GetDisplayName() const { 42 std::string CertPrincipal::GetDisplayName() const {
(...skipping 27 matching lines...) Expand all
70 exploded.second = ParseIntAndAdvance(&field, 2, &valid); 70 exploded.second = ParseIntAndAdvance(&field, 2, &valid);
71 if (valid && year_length == 2) 71 if (valid && year_length == 2)
72 exploded.year += exploded.year < 50 ? 2000 : 1900; 72 exploded.year += exploded.year < 50 ? 2000 : 1900;
73 73
74 if (!valid) 74 if (!valid)
75 return false; 75 return false;
76 return base::Time::FromUTCExploded(exploded, time); 76 return base::Time::FromUTCExploded(exploded, time);
77 } 77 }
78 78
79 } // namespace net 79 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/nss_profile_filter_chromeos_unittest.cc ('k') | net/cert/x509_util_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698