cpplinting

This commit is contained in:
Paul Betts 2015-10-21 13:17:56 -07:00
parent 938d68eb36
commit d020a7dc86
2 changed files with 6 additions and 7 deletions

View file

@ -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<v8::Value> 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();
}

View file

@ -77,7 +77,7 @@ class App : public mate::EventEmitter,
v8::Local<v8::Value> DefaultSession(v8::Isolate* isolate);
v8::Global<v8::Value> default_session_;
scoped_ptr<AtomProcessSingleton> process_singleton_;
ProcessSingleton::NotifyResult process_notify_result_;