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

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

Issue 2913293002: Clean up the unpack directory for CRLSet component. (Closed)
Patch Set: Created 3 years, 6 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 | « 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 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 "ios/chrome/browser/net/crl_set_fetcher.h" 5 #include "ios/chrome/browser/net/crl_set_fetcher.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 void CRLSetFetcher::OnUpdateError(int error) { 158 void CRLSetFetcher::OnUpdateError(int error) {
159 LOG(WARNING) << "CRLSetFetcher got error " << error 159 LOG(WARNING) << "CRLSetFetcher got error " << error
160 << " from component installer"; 160 << " from component installer";
161 } 161 }
162 162
163 update_client::CrxInstaller::Result CRLSetFetcher::Install( 163 update_client::CrxInstaller::Result CRLSetFetcher::Install(
164 const base::DictionaryValue& manifest, 164 const base::DictionaryValue& manifest,
165 const base::FilePath& unpack_path) { 165 const base::FilePath& unpack_path) {
166 return update_client::InstallFunctionWrapper( 166 const auto result = update_client::InstallFunctionWrapper(
167 base::Bind(&CRLSetFetcher::DoInstall, base::Unretained(this), 167 base::Bind(&CRLSetFetcher::DoInstall, base::Unretained(this),
168 base::ConstRef(manifest), base::ConstRef(unpack_path))); 168 base::ConstRef(manifest), base::ConstRef(unpack_path)));
169 base::DeleteFile(unpack_path, true /* recursive */);
170 return result;
169 } 171 }
170 172
171 bool CRLSetFetcher::DoInstall(const base::DictionaryValue& manifest, 173 bool CRLSetFetcher::DoInstall(const base::DictionaryValue& manifest,
172 const base::FilePath& unpack_path) { 174 const base::FilePath& unpack_path) {
173 base::FilePath crl_set_file_path = 175 base::FilePath crl_set_file_path =
174 unpack_path.Append(FILE_PATH_LITERAL("crl-set")); 176 unpack_path.Append(FILE_PATH_LITERAL("crl-set"));
175 base::FilePath save_to = GetCRLSetFilePath(); 177 base::FilePath save_to = GetCRLSetFilePath();
176 178
177 std::string crl_set_bytes; 179 std::string crl_set_bytes;
178 if (!base::ReadFileToString(crl_set_file_path, &crl_set_bytes)) { 180 if (!base::ReadFileToString(crl_set_file_path, &crl_set_bytes)) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 bool CRLSetFetcher::GetInstalledFile(const std::string& file, 240 bool CRLSetFetcher::GetInstalledFile(const std::string& file,
239 base::FilePath* installed_file) { 241 base::FilePath* installed_file) {
240 return false; 242 return false;
241 } 243 }
242 244
243 bool CRLSetFetcher::Uninstall() { 245 bool CRLSetFetcher::Uninstall() {
244 return false; 246 return false;
245 } 247 }
246 248
247 CRLSetFetcher::~CRLSetFetcher() {} 249 CRLSetFetcher::~CRLSetFetcher() {}
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