OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/component_updater/component_patcher.h" | 5 #include "components/component_updater/component_patcher.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/json/json_file_value_serializer.h" | 14 #include "base/json/json_file_value_serializer.h" |
15 #include "base/location.h" | 15 #include "base/location.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "chrome/browser/component_updater/component_patcher_operation.h" | 18 #include "components/component_updater/component_patcher_operation.h" |
19 #include "chrome/browser/component_updater/component_updater_service.h" | 19 #include "components/component_updater/component_updater_service.h" |
20 | 20 |
21 namespace component_updater { | 21 namespace component_updater { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Deserialize the commands file (present in delta update packages). The top | 25 // Deserialize the commands file (present in delta update packages). The top |
26 // level must be a list. | 26 // level must be a list. |
27 base::ListValue* ReadCommands(const base::FilePath& unpack_path) { | 27 base::ListValue* ReadCommands(const base::FilePath& unpack_path) { |
28 const base::FilePath commands = | 28 const base::FilePath commands = |
29 unpack_path.Append(FILE_PATH_LITERAL("commands.json")); | 29 unpack_path.Append(FILE_PATH_LITERAL("commands.json")); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 void ComponentPatcher::DonePatching(ComponentUnpacker::Error error, | 117 void ComponentPatcher::DonePatching(ComponentUnpacker::Error error, |
118 int extended_error) { | 118 int extended_error) { |
119 current_operation_ = NULL; | 119 current_operation_ = NULL; |
120 task_runner_->PostTask(FROM_HERE, | 120 task_runner_->PostTask(FROM_HERE, |
121 base::Bind(callback_, error, extended_error)); | 121 base::Bind(callback_, error, extended_error)); |
122 callback_.Reset(); | 122 callback_.Reset(); |
123 } | 123 } |
124 | 124 |
125 } // namespace component_updater | 125 } // namespace component_updater |
OLD | NEW |