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

Unified Diff: apps/shell/shell_browser_main_parts.cc

Issue 101203008: Allow app_shell to run past extension manifest parsing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup register_manifest Created 6 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
« no previous file with comments | « apps/shell/shell_browser_main_parts.h ('k') | apps/shell/shell_extension_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shell/shell_browser_main_parts.cc
diff --git a/apps/shell/shell_browser_main_parts.cc b/apps/shell/shell_browser_main_parts.cc
index ae442f7f8c300f1269e9f2033dd165ac02e1f28d..06fecad8485cf9fe606feff56226fa7e6aaf8bf5 100644
--- a/apps/shell/shell_browser_main_parts.cc
+++ b/apps/shell/shell_browser_main_parts.cc
@@ -15,7 +15,6 @@
#include "base/run_loop.h"
#include "chrome/browser/extensions/extension_system_factory.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/extensions/extension_file_util.h"
#include "chromeos/chromeos_paths.h"
#include "content/public/common/result_codes.h"
#include "extensions/common/extension_paths.h"
@@ -94,7 +93,7 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(kAppSwitch)) {
base::FilePath app_dir(command_line->GetSwitchValueNative(kAppSwitch));
- LoadAndLaunchApp(app_dir);
+ extension_system_->LoadAndLaunchApp(app_dir);
} else {
// TODO(jamescook): For demo purposes create a window with a WebView just
// to ensure that the content module is properly initialized.
@@ -159,24 +158,4 @@ void ShellBrowserMainParts::CreateExtensionSystem() {
extension_system_->InitForRegularProfile(true);
}
-bool ShellBrowserMainParts::LoadAndLaunchApp(const base::FilePath& app_dir) {
- DCHECK(extension_system_);
- std::string load_error;
- scoped_refptr<Extension> extension =
- extension_file_util::LoadExtension(app_dir,
- extensions::Manifest::COMMAND_LINE,
- Extension::NO_FLAGS,
- &load_error);
- if (!extension) {
- LOG(ERROR) << "Loading extension at " << app_dir.value()
- << " failed with: " << load_error;
- return false;
- }
-
- // TODO(jamescook): Add to ExtensionRegistry.
- // TODO(jamescook): Set ExtensionSystem ready.
- // TODO(jamescook): Send NOTIFICATION_EXTENSION_LOADED.
- return true;
-}
-
} // namespace apps
« no previous file with comments | « apps/shell/shell_browser_main_parts.h ('k') | apps/shell/shell_extension_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698