Use base::FilePath

This commit is contained in:
Ryohei Ikegami 2017-04-13 10:59:12 +09:00
parent c77e07bc15
commit 9d62b196d3
3 changed files with 6 additions and 6 deletions

View file

@ -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;
}

View file

@ -70,7 +70,7 @@ class App : public AtomBrowserClient::Delegate,
std::unique_ptr<CertificateManagerModel> 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);
};

View file

@ -236,7 +236,7 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
if (delegate_) {
auto app_path = static_cast<api::App*>(delegate_)->GetAppPath();
command_line->AppendSwitchASCII(switches::kAppPath, app_path);
command_line->AppendSwitchPath(switches::kAppPath, app_path);
}
content::WebContents* web_contents = GetWebContentsFromProcessID(process_id);