Index: athena/main/athena_main.cc |
diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc |
index 6ac6efc6fd013b384a08bf48a9a20ef721942fa1..71eb0b5c90f5dd30c685b56a82e4c0d163f1037b 100644 |
--- a/athena/main/athena_main.cc |
+++ b/athena/main/athena_main.cc |
@@ -21,7 +21,12 @@ |
#include "ui/wm/core/visibility_controller.h" |
namespace { |
-const std::string kAppSwitch = "app"; |
+const char kAppSwitch[] = "app"; |
+ |
+// We want to load the sample calculator app by default, for a while. Expecting |
+// to run athena_main at src/ |
+const char kDefaultAppPath[] = |
+ "chrome/common/extensions/docs/examples/apps/calculator/app"; |
} // namespace |
class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate { |
@@ -32,14 +37,16 @@ class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate { |
// apps::ShellBrowserMainDelegate: |
virtual void Start(content::BrowserContext* context) OVERRIDE { |
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
- if (command_line->HasSwitch(kAppSwitch)) { |
- base::FilePath app_dir(command_line->GetSwitchValueNative(kAppSwitch)); |
- base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); |
- extensions::ShellExtensionSystem* extension_system = |
- static_cast<extensions::ShellExtensionSystem*>( |
- extensions::ExtensionSystem::Get(context)); |
- extension_system->LoadApp(app_absolute_dir); |
- } |
+ base::FilePath app_dir = base::FilePath::FromUTF8Unsafe( |
+ command_line->HasSwitch(kAppSwitch) ? |
+ command_line->GetSwitchValueNative(kAppSwitch) : |
+ kDefaultAppPath); |
oshima
2014/06/19 23:28:27
what if the directory does not exist? Just want to
Jun Mukai
2014/06/19 23:34:18
Oops, didn't notice shell_extension_system has a C
|
+ |
+ base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); |
+ extensions::ShellExtensionSystem* extension_system = |
+ static_cast<extensions::ShellExtensionSystem*>( |
+ extensions::ExtensionSystem::Get(context)); |
+ extension_system->LoadApp(app_absolute_dir); |
athena::StartAthena( |
apps::ShellDesktopController::instance()->host()->window(), |