diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index a53e957660e..d8e79171f87 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -655,11 +655,11 @@ void App::OnGpuProcessCrashed(base::TerminationStatus status) { status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED); } -std::string App::GetAppPath() { +base::FilePath App::GetAppPath() { return app_path_; } -void App::SetAppPath(const std::string& app_path) { +void App::SetAppPath(const base::FilePath& app_path) { app_path_ = app_path; } diff --git a/atom/browser/api/atom_api_app.h b/atom/browser/api/atom_api_app.h index 4b09d770310..78871f6920e 100644 --- a/atom/browser/api/atom_api_app.h +++ b/atom/browser/api/atom_api_app.h @@ -70,7 +70,7 @@ class App : public AtomBrowserClient::Delegate, std::unique_ptr model); #endif - std::string GetAppPath(); + base::FilePath GetAppPath(); protected: explicit App(v8::Isolate* isolate); @@ -117,7 +117,7 @@ class App : public AtomBrowserClient::Delegate, void OnGpuProcessCrashed(base::TerminationStatus status) override; private: - void SetAppPath(const std::string& app_path); + void SetAppPath(const base::FilePath& app_path); // Get/Set the pre-defined path in PathService. base::FilePath GetPath(mate::Arguments* args, const std::string& name); @@ -158,7 +158,7 @@ class App : public AtomBrowserClient::Delegate, // Tracks tasks requesting file icons. base::CancelableTaskTracker cancelable_task_tracker_; - std::string app_path_; + base::FilePath app_path_; DISALLOW_COPY_AND_ASSIGN(App); }; diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 3908c9613a0..db33e2e38fd 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -236,7 +236,7 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches( if (delegate_) { auto app_path = static_cast(delegate_)->GetAppPath(); - command_line->AppendSwitchASCII(switches::kAppPath, app_path); + command_line->AppendSwitchPath(switches::kAppPath, app_path); } content::WebContents* web_contents = GetWebContentsFromProcessID(process_id);