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

Side by Side Diff: components/update_client/component_unpacker.cc

Issue 897873002: Make ComponentInstaller refcounted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@2015_01_19_component_installer
Patch Set: fix Created 5 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/update_client/component_unpacker.h" 5 #include "components/update_client/component_unpacker.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 bool is_delta_; 95 bool is_delta_;
96 std::vector<uint8_t> public_key_; 96 std::vector<uint8_t> public_key_;
97 }; 97 };
98 98
99 } // namespace 99 } // namespace
100 100
101 ComponentUnpacker::ComponentUnpacker( 101 ComponentUnpacker::ComponentUnpacker(
102 const std::vector<uint8_t>& pk_hash, 102 const std::vector<uint8_t>& pk_hash,
103 const base::FilePath& path, 103 const base::FilePath& path,
104 const std::string& fingerprint, 104 const std::string& fingerprint,
105 ComponentInstaller* installer, 105 const scoped_refptr<ComponentInstaller>& installer,
106 scoped_refptr<OutOfProcessPatcher> oop_patcher, 106 const scoped_refptr<OutOfProcessPatcher>& oop_patcher,
107 scoped_refptr<base::SequencedTaskRunner> task_runner) 107 const scoped_refptr<base::SequencedTaskRunner>& task_runner)
108 : pk_hash_(pk_hash), 108 : pk_hash_(pk_hash),
109 path_(path), 109 path_(path),
110 is_delta_(false), 110 is_delta_(false),
111 fingerprint_(fingerprint), 111 fingerprint_(fingerprint),
112 installer_(installer), 112 installer_(installer),
113 oop_patcher_(oop_patcher), 113 oop_patcher_(oop_patcher),
114 error_(kNone), 114 error_(kNone),
115 extended_error_(0), 115 extended_error_(0),
116 task_runner_(task_runner) { 116 task_runner_(task_runner) {
117 } 117 }
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 base::DeleteFile(unpack_diff_path_, true); 270 base::DeleteFile(unpack_diff_path_, true);
271 if (!unpack_path_.empty()) 271 if (!unpack_path_.empty())
272 base::DeleteFile(unpack_path_, true); 272 base::DeleteFile(unpack_path_, true);
273 callback_.Run(error_, extended_error_); 273 callback_.Run(error_, extended_error_);
274 } 274 }
275 275
276 ComponentUnpacker::~ComponentUnpacker() { 276 ComponentUnpacker::~ComponentUnpacker() {
277 } 277 }
278 278
279 } // namespace update_client 279 } // namespace update_client
OLDNEW
« no previous file with comments | « components/update_client/component_unpacker.h ('k') | components/update_client/test/component_patcher_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698