Singleton must be created on request

The creation of singleton relies on the `userData` dir, which can be
changed by user, we have to ensure singleton uses the `userData` dir set
by user.
This commit is contained in:
Cheng Zhao
2018-01-03 18:59:12 +09:00
parent 0cce6b3d21
commit 952928dc79
7 changed files with 41 additions and 46 deletions

View File

@@ -218,6 +218,8 @@ class App : public AtomBrowserClient::Delegate,
JumpListResult SetJumpList(v8::Local<v8::Value> val, mate::Arguments* args);
#endif // defined(OS_WIN)
std::unique_ptr<ProcessSingleton> process_singleton_;
#if defined(USE_NSS_CERTS)
std::unique_ptr<CertificateManagerModel> certificate_manager_model_;
#endif
@@ -232,8 +234,6 @@ class App : public AtomBrowserClient::Delegate,
std::unique_ptr<atom::ProcessMetric>>;
ProcessMetricMap app_metrics_;
bool process_singleton_created_ = false;
DISALLOW_COPY_AND_ASSIGN(App);
};