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

Side by Side Diff: chrome/browser/net/crl_set_fetcher.cc

Issue 2258263002: Consistently use namespaced base::Version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased against master. Created 4 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
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/net/crl_set_fetcher.h" 5 #include "chrome/browser/net/crl_set_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/numerics/safe_conversions.h" 9 #include "base/numerics/safe_conversions.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 }; 137 };
138 138
139 void CRLSetFetcher::RegisterComponent(uint32_t sequence_of_loaded_crl) { 139 void CRLSetFetcher::RegisterComponent(uint32_t sequence_of_loaded_crl) {
140 DCHECK_CURRENTLY_ON(BrowserThread::UI); 140 DCHECK_CURRENTLY_ON(BrowserThread::UI);
141 141
142 update_client::CrxComponent component; 142 update_client::CrxComponent component;
143 component.pk_hash.assign(kPublicKeySHA256, 143 component.pk_hash.assign(kPublicKeySHA256,
144 kPublicKeySHA256 + sizeof(kPublicKeySHA256)); 144 kPublicKeySHA256 + sizeof(kPublicKeySHA256));
145 component.installer = this; 145 component.installer = this;
146 component.name = "CRLSet"; 146 component.name = "CRLSet";
147 component.version = Version(base::UintToString(sequence_of_loaded_crl)); 147 component.version = base::Version(base::UintToString(sequence_of_loaded_crl));
148 component.allows_background_download = false; 148 component.allows_background_download = false;
149 component.requires_network_encryption = false; 149 component.requires_network_encryption = false;
150 if (!component.version.IsValid()) { 150 if (!component.version.IsValid()) {
151 NOTREACHED(); 151 NOTREACHED();
152 component.version = Version("0"); 152 component.version = base::Version("0");
153 } 153 }
154 154
155 if (!cus_->RegisterComponent(component)) 155 if (!cus_->RegisterComponent(component))
156 NOTREACHED() << "RegisterComponent returned error"; 156 NOTREACHED() << "RegisterComponent returned error";
157 } 157 }
158 158
159 void CRLSetFetcher::DoDeleteFromDisk() { 159 void CRLSetFetcher::DoDeleteFromDisk() {
160 DCHECK_CURRENTLY_ON(BrowserThread::FILE); 160 DCHECK_CURRENTLY_ON(BrowserThread::FILE);
161 161
162 DeleteFile(GetCRLSetFilePath(), false /* not recursive */); 162 DeleteFile(GetCRLSetFilePath(), false /* not recursive */);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 bool CRLSetFetcher::GetInstalledFile( 238 bool CRLSetFetcher::GetInstalledFile(
239 const std::string& file, base::FilePath* installed_file) { 239 const std::string& file, base::FilePath* installed_file) {
240 return false; 240 return false;
241 } 241 }
242 242
243 bool CRLSetFetcher::Uninstall() { 243 bool CRLSetFetcher::Uninstall() {
244 return false; 244 return false;
245 } 245 }
246 246
247 CRLSetFetcher::~CRLSetFetcher() {} 247 CRLSetFetcher::~CRLSetFetcher() {}
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698