refactor: move IOThread and NetLog ownership to g_browser_process

This commit is contained in:
deepak1556 2018-11-07 18:53:09 +05:30
parent 414dcfcd07
commit 666a106fa8
8 changed files with 45 additions and 50 deletions

View file

@ -13,6 +13,7 @@
#include <memory>
#include <string>
#include "atom/browser/io_thread.h"
#include "atom/browser/net/system_network_context_manager.h"
#include "base/command_line.h"
#include "base/macros.h"
@ -22,6 +23,10 @@
#include "printing/buildflags/buildflags.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
namespace net_log {
class ChromeNetLog;
}
namespace printing {
class PrintJobManager;
}
@ -40,6 +45,7 @@ class BrowserProcessImpl : public BrowserProcess {
void PostEarlyInitialization();
void PreCreateThreads(const base::CommandLine& command_line);
void PostDestroyThreads();
void PostMainMessageLoopRun();
void ResourceDispatcherHostCreated() override {}
@ -113,6 +119,8 @@ class BrowserProcessImpl : public BrowserProcess {
std::unique_ptr<printing::PrintJobManager> print_job_manager_;
#endif
std::unique_ptr<PrefService> local_state_;
std::unique_ptr<IOThread> io_thread_;
std::unique_ptr<net_log::ChromeNetLog> net_log_;
std::unique_ptr<SystemNetworkContextManager> system_network_context_manager_;
std::string locale_;