Use base::FilePath
This commit is contained in:
parent
c77e07bc15
commit
9d62b196d3
3 changed files with 6 additions and 6 deletions
|
@ -655,11 +655,11 @@ void App::OnGpuProcessCrashed(base::TerminationStatus status) {
|
||||||
status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);
|
status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string App::GetAppPath() {
|
base::FilePath App::GetAppPath() {
|
||||||
return app_path_;
|
return app_path_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void App::SetAppPath(const std::string& app_path) {
|
void App::SetAppPath(const base::FilePath& app_path) {
|
||||||
app_path_ = app_path;
|
app_path_ = app_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ class App : public AtomBrowserClient::Delegate,
|
||||||
std::unique_ptr<CertificateManagerModel> model);
|
std::unique_ptr<CertificateManagerModel> model);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string GetAppPath();
|
base::FilePath GetAppPath();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit App(v8::Isolate* isolate);
|
explicit App(v8::Isolate* isolate);
|
||||||
|
@ -117,7 +117,7 @@ class App : public AtomBrowserClient::Delegate,
|
||||||
void OnGpuProcessCrashed(base::TerminationStatus status) override;
|
void OnGpuProcessCrashed(base::TerminationStatus status) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetAppPath(const std::string& app_path);
|
void SetAppPath(const base::FilePath& app_path);
|
||||||
|
|
||||||
// Get/Set the pre-defined path in PathService.
|
// Get/Set the pre-defined path in PathService.
|
||||||
base::FilePath GetPath(mate::Arguments* args, const std::string& name);
|
base::FilePath GetPath(mate::Arguments* args, const std::string& name);
|
||||||
|
@ -158,7 +158,7 @@ class App : public AtomBrowserClient::Delegate,
|
||||||
// Tracks tasks requesting file icons.
|
// Tracks tasks requesting file icons.
|
||||||
base::CancelableTaskTracker cancelable_task_tracker_;
|
base::CancelableTaskTracker cancelable_task_tracker_;
|
||||||
|
|
||||||
std::string app_path_;
|
base::FilePath app_path_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(App);
|
DISALLOW_COPY_AND_ASSIGN(App);
|
||||||
};
|
};
|
||||||
|
|
|
@ -236,7 +236,7 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
|
||||||
|
|
||||||
if (delegate_) {
|
if (delegate_) {
|
||||||
auto app_path = static_cast<api::App*>(delegate_)->GetAppPath();
|
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);
|
content::WebContents* web_contents = GetWebContentsFromProcessID(process_id);
|
||||||
|
|
Loading…
Reference in a new issue