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

Side by Side Diff: components/component_updater/component_patcher_operation.h

Issue 590333002: Replace usage of basictypes.h with a combination of stdint.h and base/macros.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 2 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 #ifndef COMPONENTS_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_H_ 5 #ifndef COMPONENTS_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_H_
6 #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_H_ 6 #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h"
11 #include "base/callback.h" 10 #include "base/callback.h"
12 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
13 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "components/component_updater/component_unpacker.h" 15 #include "components/component_updater/component_unpacker.h"
16 16
17 namespace base { 17 namespace base {
18 class DictionaryValue; 18 class DictionaryValue;
19 } // namespace base 19 } // namespace base
20 20
21 namespace component_updater { 21 namespace component_updater {
22 22
23 extern const char kOp[]; 23 extern const char kOp[];
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 DISALLOW_COPY_AND_ASSIGN(DeltaUpdateOpCreate); 125 DISALLOW_COPY_AND_ASSIGN(DeltaUpdateOpCreate);
126 }; 126 };
127 127
128 // An interface an embedder may fulfill to enable out-of-process patching. 128 // An interface an embedder may fulfill to enable out-of-process patching.
129 class OutOfProcessPatcher 129 class OutOfProcessPatcher
130 : public base::RefCountedThreadSafe<OutOfProcessPatcher> { 130 : public base::RefCountedThreadSafe<OutOfProcessPatcher> {
131 public: 131 public:
132 virtual void Patch(const std::string& operation, 132 virtual void Patch(const std::string& operation,
133 scoped_refptr<base::SequencedTaskRunner> task_runner, 133 scoped_refptr<base::SequencedTaskRunner> task_runner,
134 base::FilePath& input_abs_path, 134 const base::FilePath& input_abs_path,
135 base::FilePath& patch_abs_path, 135 const base::FilePath& patch_abs_path,
136 base::FilePath& output_abs_path, 136 const base::FilePath& output_abs_path,
137 base::Callback<void(int result)> callback) = 0; 137 base::Callback<void(int result)> callback) = 0;
138 138
139 protected: 139 protected:
140 friend class base::RefCountedThreadSafe<OutOfProcessPatcher>; 140 friend class base::RefCountedThreadSafe<OutOfProcessPatcher>;
141 141
142 virtual ~OutOfProcessPatcher() {} 142 virtual ~OutOfProcessPatcher() {}
143 }; 143 };
144 144
145 // Both 'bsdiff' and 'courgette' operations take an existing file on disk, 145 // Both 'bsdiff' and 'courgette' operations take an existing file on disk,
146 // and a bsdiff- or Courgette-format patch file provided in the delta update 146 // and a bsdiff- or Courgette-format patch file provided in the delta update
(...skipping 28 matching lines...) Expand all
175 DISALLOW_COPY_AND_ASSIGN(DeltaUpdateOpPatch); 175 DISALLOW_COPY_AND_ASSIGN(DeltaUpdateOpPatch);
176 }; 176 };
177 177
178 DeltaUpdateOp* CreateDeltaUpdateOp( 178 DeltaUpdateOp* CreateDeltaUpdateOp(
179 const std::string& operation, 179 const std::string& operation,
180 scoped_refptr<OutOfProcessPatcher> out_of_process_patcher); 180 scoped_refptr<OutOfProcessPatcher> out_of_process_patcher);
181 181
182 } // namespace component_updater 182 } // namespace component_updater
183 183
184 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_H_ 184 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_H_
OLDNEW
« no previous file with comments | « components/component_updater/component_patcher.cc ('k') | components/component_updater/component_patcher_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698