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

Side by Side Diff: extensions/browser/sandboxed_unpacker.h

Issue 2788563002: Transfer DictionaryValue ownership in SandboxedUnpacker::OnUnpackSuccess() (Closed)
Patch Set: address comments Created 3 years, 8 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 | « chrome/browser/extensions/startup_helper.cc ('k') | extensions/browser/sandboxed_unpacker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ 5 #ifndef EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_
6 #define EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ 6 #define EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // 44 //
45 // extension_root - The path to the extension root inside of temp_dir. 45 // extension_root - The path to the extension root inside of temp_dir.
46 // 46 //
47 // original_manifest - The parsed but unmodified version of the manifest, 47 // original_manifest - The parsed but unmodified version of the manifest,
48 // with no modifications such as localization, etc. 48 // with no modifications such as localization, etc.
49 // 49 //
50 // extension - The extension that was unpacked. The client is responsible 50 // extension - The extension that was unpacked. The client is responsible
51 // for deleting this memory. 51 // for deleting this memory.
52 // 52 //
53 // install_icon - The icon we will display in the installation UI, if any. 53 // install_icon - The icon we will display in the installation UI, if any.
54 virtual void OnUnpackSuccess(const base::FilePath& temp_dir, 54 virtual void OnUnpackSuccess(
55 const base::FilePath& extension_root, 55 const base::FilePath& temp_dir,
56 const base::DictionaryValue* original_manifest, 56 const base::FilePath& extension_root,
57 const Extension* extension, 57 std::unique_ptr<base::DictionaryValue> original_manifest,
58 const SkBitmap& install_icon) = 0; 58 const Extension* extension,
59 const SkBitmap& install_icon) = 0;
59 virtual void OnUnpackFailure(const CrxInstallError& error) = 0; 60 virtual void OnUnpackFailure(const CrxInstallError& error) = 0;
60 61
61 protected: 62 protected:
62 friend class base::RefCountedDeleteOnSequence<SandboxedUnpackerClient>; 63 friend class base::RefCountedDeleteOnSequence<SandboxedUnpackerClient>;
63 friend class base::DeleteHelper<SandboxedUnpackerClient>; 64 friend class base::DeleteHelper<SandboxedUnpackerClient>;
64 65
65 virtual ~SandboxedUnpackerClient() = default; 66 virtual ~SandboxedUnpackerClient() = default;
66 }; 67 };
67 68
68 // SandboxedUnpacker does work to optionally unpack and then validate/sanitize 69 // SandboxedUnpacker does work to optionally unpack and then validate/sanitize
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // Utility client used for sending tasks to the utility process. 272 // Utility client used for sending tasks to the utility process.
272 std::unique_ptr<content::UtilityProcessMojoClient<mojom::ExtensionUnpacker>> 273 std::unique_ptr<content::UtilityProcessMojoClient<mojom::ExtensionUnpacker>>
273 utility_process_mojo_client_; 274 utility_process_mojo_client_;
274 275
275 DISALLOW_COPY_AND_ASSIGN(SandboxedUnpacker); 276 DISALLOW_COPY_AND_ASSIGN(SandboxedUnpacker);
276 }; 277 };
277 278
278 } // namespace extensions 279 } // namespace extensions
279 280
280 #endif // EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_ 281 #endif // EXTENSIONS_BROWSER_SANDBOXED_UNPACKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/startup_helper.cc ('k') | extensions/browser/sandboxed_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698