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

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

Issue 510313002: Extensions-related fixups for scoped_refptr conversion operator removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 (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 CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_
6 #define CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Additionally, we hold a reference to our own client so that it lives at least 71 // Additionally, we hold a reference to our own client so that it lives at least
72 // long enough to receive the result of unpacking. 72 // long enough to receive the result of unpacking.
73 // 73 //
74 // 74 //
75 // NOTE: This class should only be used on the file thread. 75 // NOTE: This class should only be used on the file thread.
76 class SandboxedUnpacker : public content::UtilityProcessHostClient { 76 class SandboxedUnpacker : public content::UtilityProcessHostClient {
77 public: 77 public:
78 // Unpacks the extension in |crx_path| into a temporary directory and calls 78 // Unpacks the extension in |crx_path| into a temporary directory and calls
79 // |client| with the result. If |run_out_of_process| is provided, unpacking 79 // |client| with the result. If |run_out_of_process| is provided, unpacking
80 // is done in a sandboxed subprocess. Otherwise, it is done in-process. 80 // is done in a sandboxed subprocess. Otherwise, it is done in-process.
81 SandboxedUnpacker(const base::FilePath& crx_path, 81 SandboxedUnpacker(
82 Manifest::Location location, 82 const base::FilePath& crx_path,
83 int creation_flags, 83 Manifest::Location location,
84 const base::FilePath& extensions_dir, 84 int creation_flags,
85 base::SequencedTaskRunner* unpacker_io_task_runner, 85 const base::FilePath& extensions_dir,
86 SandboxedUnpackerClient* client); 86 const scoped_refptr<base::SequencedTaskRunner>& unpacker_io_task_runner,
87 SandboxedUnpackerClient* client);
87 88
88 // Start unpacking the extension. The client is called with the results. 89 // Start unpacking the extension. The client is called with the results.
89 void Start(); 90 void Start();
90 91
91 private: 92 private:
92 class ProcessHostClient; 93 class ProcessHostClient;
93 94
94 // Enumerate all the ways unpacking can fail. Calls to ReportFailure() 95 // Enumerate all the ways unpacking can fail. Calls to ReportFailure()
95 // take a failure reason as an argument, and put it in histogram 96 // take a failure reason as an argument, and put it in histogram
96 // Extensions.SandboxUnpackFailureReason. 97 // Extensions.SandboxUnpackFailureReason.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // when calling Extenion::Create() by the crx installer. 237 // when calling Extenion::Create() by the crx installer.
237 int creation_flags_; 238 int creation_flags_;
238 239
239 // Sequenced task runner where file I/O operations will be performed at. 240 // Sequenced task runner where file I/O operations will be performed at.
240 scoped_refptr<base::SequencedTaskRunner> unpacker_io_task_runner_; 241 scoped_refptr<base::SequencedTaskRunner> unpacker_io_task_runner_;
241 }; 242 };
242 243
243 } // namespace extensions 244 } // namespace extensions
244 245
245 #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_ 246 #endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_UNPACKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/permissions_updater.cc ('k') | chrome/browser/extensions/sandboxed_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698