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

Unified Diff: chrome/browser/extensions/sandboxed_extension_unpacker.h

Issue 9150016: Move creation and ownership of ResourceDispatcherHost and PluginService to content. This gives a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/sandboxed_extension_unpacker.h
===================================================================
--- chrome/browser/extensions/sandboxed_extension_unpacker.h (revision 116798)
+++ chrome/browser/extensions/sandboxed_extension_unpacker.h (working copy)
@@ -15,7 +15,6 @@
#include "content/browser/utility_process_host.h"
class Extension;
-class ResourceDispatcherHost;
namespace base {
class DictionaryValue;
@@ -98,10 +97,8 @@
static const uint32 kCurrentVersion = 2;
// Unpacks the extension in |crx_path| into a temporary directory and calls
- // |client| with the result. If |rdh| is provided, unpacking is done in a
- // sandboxed subprocess. Otherwise, it is done in-process.
+ // |client| with the result.
SandboxedExtensionUnpacker(const FilePath& crx_path,
- ResourceDispatcherHost* rdh,
Extension::Location location,
int creation_flags,
SandboxedExtensionUnpackerClient* client);
@@ -109,6 +106,8 @@
// Start unpacking the extension. The client is called with the results.
void Start();
+ void set_use_utility_process(bool value) { use_utility_process_ = value; }
+
private:
class ProcessHostClient;
@@ -220,9 +219,6 @@
// Our client's thread. This is the thread we respond on.
content::BrowserThread::ID thread_identifier_;
- // ResourceDispatcherHost to pass to the utility process.
- ResourceDispatcherHost* rdh_;
-
// Our client.
scoped_refptr<SandboxedExtensionUnpackerClient> client_;
@@ -250,6 +246,9 @@
// Creation flags to use for the extension. These flags will be used
// when calling Extenion::Create() by the crx installer.
int creation_flags_;
+
+ // True if the utility process is used, false otherwise (i.e. for tests).
+ bool use_utility_process_;
};
#endif // CHROME_BROWSER_EXTENSIONS_SANDBOXED_EXTENSION_UNPACKER_H_

Powered by Google App Engine
This is Rietveld 408576698