From d020a7dc86f7c628ea3a78fe2c0719c4b72bb48e Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Wed, 21 Oct 2015 13:17:56 -0700 Subject: [PATCH] cpplinting --- atom/browser/api/atom_api_app.cc | 11 +++++------ atom/browser/api/atom_api_app.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index 97d5cf6aa2df..6906608fb76f 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -161,12 +161,12 @@ void App::OnWindowAllClosed() { void App::OnQuit() { Emit("quit"); - + if (process_singleton_.get()) { if (process_notify_result_ == ProcessSingleton::PROCESS_NONE) { process_singleton_->Cleanup(); } - + process_singleton_.reset(); } } @@ -195,7 +195,7 @@ void App::OnFinishLaunching() { AtomBrowserMainParts::Get()->browser_context()); auto handle = Session::CreateFrom(isolate(), browser_context); default_session_.Reset(isolate(), handle.ToV8()); - + if (process_singleton_.get()) { process_singleton_->Unlock(); } @@ -282,14 +282,13 @@ v8::Local App::DefaultSession(v8::Isolate* isolate) { } bool App::MakeSingleInstance(ProcessSingleton::NotificationCallback callback) { - base::FilePath userDir; PathService::Get(brightray::DIR_USER_DATA, &userDir); - + if (!process_singleton_.get()) { auto browser = Browser::Get(); process_singleton_.reset(new AtomProcessSingleton(userDir, callback)); - + if (browser->is_ready()) { process_singleton_->Unlock(); } diff --git a/atom/browser/api/atom_api_app.h b/atom/browser/api/atom_api_app.h index 82ae04502030..77944d3441ea 100644 --- a/atom/browser/api/atom_api_app.h +++ b/atom/browser/api/atom_api_app.h @@ -77,7 +77,7 @@ class App : public mate::EventEmitter, v8::Local DefaultSession(v8::Isolate* isolate); v8::Global default_session_; - + scoped_ptr process_singleton_; ProcessSingleton::NotifyResult process_notify_result_;