Commit 0ed279ba authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Remove BrowserProcess:created_local_state().

This was added in r190833 to support a test, but the test and the code
it was testing got removed in r253803, leaving created_local_state()
with no callers.

Change-Id: Id988d101eb47b496f6e3502c220c5b23ba6144f8
Reviewed-on: https://chromium-review.googlesource.com/587347Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491172}
parent e0faf622
......@@ -276,8 +276,6 @@ class BrowserProcess {
virtual MediaFileSystemRegistry* media_file_system_registry() = 0;
virtual bool created_local_state() const = 0;
#if BUILDFLAG(ENABLE_WEBRTC)
virtual WebRtcLogUploader* webrtc_log_uploader() = 0;
#endif
......
......@@ -217,7 +217,6 @@ BrowserProcessImpl::BrowserProcessImpl(
: created_watchdog_thread_(false),
created_browser_policy_connector_(false),
created_profile_manager_(false),
created_local_state_(false),
created_icon_manager_(false),
created_notification_ui_manager_(false),
created_notification_bridge_(false),
......@@ -583,7 +582,7 @@ ProfileManager* BrowserProcessImpl::profile_manager() {
PrefService* BrowserProcessImpl::local_state() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!created_local_state_)
if (!local_state_)
CreateLocalState();
return local_state_.get();
}
......@@ -771,10 +770,6 @@ MediaFileSystemRegistry* BrowserProcessImpl::media_file_system_registry() {
#endif
}
bool BrowserProcessImpl::created_local_state() const {
return created_local_state_;
}
#if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* BrowserProcessImpl::webrtc_log_uploader() {
if (!webrtc_log_uploader_.get())
......@@ -1034,8 +1029,7 @@ void BrowserProcessImpl::CreateProfileManager() {
}
void BrowserProcessImpl::CreateLocalState() {
DCHECK(!created_local_state_ && !local_state_);
created_local_state_ = true;
DCHECK(!local_state_);
base::FilePath local_state_path;
CHECK(PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path));
......@@ -1049,6 +1043,7 @@ void BrowserProcessImpl::CreateLocalState() {
local_state_ = chrome_prefs::CreateLocalState(
local_state_path, local_state_task_runner_.get(), policy_service(),
pref_registry, false, std::move(delegate));
DCHECK(local_state_);
pref_change_registrar_.Init(local_state_.get());
......
......@@ -149,7 +149,6 @@ class BrowserProcessImpl : public BrowserProcess,
component_updater::SupervisedUserWhitelistInstaller*
supervised_user_whitelist_installer() override;
MediaFileSystemRegistry* media_file_system_registry() override;
bool created_local_state() const override;
#if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* webrtc_log_uploader() override;
#endif
......@@ -215,7 +214,6 @@ class BrowserProcessImpl : public BrowserProcess,
bool created_profile_manager_;
std::unique_ptr<ProfileManager> profile_manager_;
bool created_local_state_;
std::unique_ptr<PrefService> local_state_;
bool created_icon_manager_;
......
......@@ -372,10 +372,6 @@ MediaFileSystemRegistry* TestingBrowserProcess::media_file_system_registry() {
#endif
}
bool TestingBrowserProcess::created_local_state() const {
return (local_state_ != nullptr);
}
#if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* TestingBrowserProcess::webrtc_log_uploader() {
return nullptr;
......
......@@ -121,7 +121,6 @@ class TestingBrowserProcess : public BrowserProcess {
component_updater::SupervisedUserWhitelistInstaller*
supervised_user_whitelist_installer() override;
MediaFileSystemRegistry* media_file_system_registry() override;
bool created_local_state() const override;
#if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* webrtc_log_uploader() override;
......
......@@ -62,8 +62,7 @@ ApplicationContextImpl::ApplicationContextImpl(
const base::CommandLine& command_line,
const std::string& locale)
: local_state_task_runner_(local_state_task_runner),
was_last_shutdown_clean_(false),
created_local_state_(false) {
was_last_shutdown_clean_(false) {
DCHECK(!GetApplicationContext());
SetApplicationContext(this);
......@@ -186,7 +185,7 @@ bool ApplicationContextImpl::WasLastShutdownClean() {
PrefService* ApplicationContextImpl::GetLocalState() {
DCHECK(thread_checker_.CalledOnValidThread());
if (!created_local_state_)
if (!local_state_)
CreateLocalState();
return local_state_.get();
}
......@@ -316,8 +315,7 @@ void ApplicationContextImpl::SetApplicationLocale(const std::string& locale) {
void ApplicationContextImpl::CreateLocalState() {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!created_local_state_ && !local_state_);
created_local_state_ = true;
DCHECK(!local_state_);
base::FilePath local_state_path;
CHECK(PathService::Get(ios::FILE_LOCAL_STATE, &local_state_path));
......@@ -328,6 +326,7 @@ void ApplicationContextImpl::CreateLocalState() {
local_state_ = ::CreateLocalState(
local_state_path, local_state_task_runner_.get(), pref_registry);
DCHECK(local_state_);
net::ClientSocketPoolManager::set_max_sockets_per_proxy_server(
net::HttpNetworkSession::NORMAL_SOCKET_POOL,
......
......@@ -91,7 +91,6 @@ class ApplicationContextImpl : public ApplicationContext {
const scoped_refptr<base::SequencedTaskRunner> local_state_task_runner_;
bool was_last_shutdown_clean_;
bool created_local_state_;
DISALLOW_COPY_AND_ASSIGN(ApplicationContextImpl);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment