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 { ...@@ -276,8 +276,6 @@ class BrowserProcess {
virtual MediaFileSystemRegistry* media_file_system_registry() = 0; virtual MediaFileSystemRegistry* media_file_system_registry() = 0;
virtual bool created_local_state() const = 0;
#if BUILDFLAG(ENABLE_WEBRTC) #if BUILDFLAG(ENABLE_WEBRTC)
virtual WebRtcLogUploader* webrtc_log_uploader() = 0; virtual WebRtcLogUploader* webrtc_log_uploader() = 0;
#endif #endif
......
...@@ -217,7 +217,6 @@ BrowserProcessImpl::BrowserProcessImpl( ...@@ -217,7 +217,6 @@ BrowserProcessImpl::BrowserProcessImpl(
: created_watchdog_thread_(false), : created_watchdog_thread_(false),
created_browser_policy_connector_(false), created_browser_policy_connector_(false),
created_profile_manager_(false), created_profile_manager_(false),
created_local_state_(false),
created_icon_manager_(false), created_icon_manager_(false),
created_notification_ui_manager_(false), created_notification_ui_manager_(false),
created_notification_bridge_(false), created_notification_bridge_(false),
...@@ -583,7 +582,7 @@ ProfileManager* BrowserProcessImpl::profile_manager() { ...@@ -583,7 +582,7 @@ ProfileManager* BrowserProcessImpl::profile_manager() {
PrefService* BrowserProcessImpl::local_state() { PrefService* BrowserProcessImpl::local_state() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!created_local_state_) if (!local_state_)
CreateLocalState(); CreateLocalState();
return local_state_.get(); return local_state_.get();
} }
...@@ -771,10 +770,6 @@ MediaFileSystemRegistry* BrowserProcessImpl::media_file_system_registry() { ...@@ -771,10 +770,6 @@ MediaFileSystemRegistry* BrowserProcessImpl::media_file_system_registry() {
#endif #endif
} }
bool BrowserProcessImpl::created_local_state() const {
return created_local_state_;
}
#if BUILDFLAG(ENABLE_WEBRTC) #if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* BrowserProcessImpl::webrtc_log_uploader() { WebRtcLogUploader* BrowserProcessImpl::webrtc_log_uploader() {
if (!webrtc_log_uploader_.get()) if (!webrtc_log_uploader_.get())
...@@ -1034,8 +1029,7 @@ void BrowserProcessImpl::CreateProfileManager() { ...@@ -1034,8 +1029,7 @@ void BrowserProcessImpl::CreateProfileManager() {
} }
void BrowserProcessImpl::CreateLocalState() { void BrowserProcessImpl::CreateLocalState() {
DCHECK(!created_local_state_ && !local_state_); DCHECK(!local_state_);
created_local_state_ = true;
base::FilePath local_state_path; base::FilePath local_state_path;
CHECK(PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path)); CHECK(PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path));
...@@ -1049,6 +1043,7 @@ void BrowserProcessImpl::CreateLocalState() { ...@@ -1049,6 +1043,7 @@ void BrowserProcessImpl::CreateLocalState() {
local_state_ = chrome_prefs::CreateLocalState( local_state_ = chrome_prefs::CreateLocalState(
local_state_path, local_state_task_runner_.get(), policy_service(), local_state_path, local_state_task_runner_.get(), policy_service(),
pref_registry, false, std::move(delegate)); pref_registry, false, std::move(delegate));
DCHECK(local_state_);
pref_change_registrar_.Init(local_state_.get()); pref_change_registrar_.Init(local_state_.get());
......
...@@ -149,7 +149,6 @@ class BrowserProcessImpl : public BrowserProcess, ...@@ -149,7 +149,6 @@ class BrowserProcessImpl : public BrowserProcess,
component_updater::SupervisedUserWhitelistInstaller* component_updater::SupervisedUserWhitelistInstaller*
supervised_user_whitelist_installer() override; supervised_user_whitelist_installer() override;
MediaFileSystemRegistry* media_file_system_registry() override; MediaFileSystemRegistry* media_file_system_registry() override;
bool created_local_state() const override;
#if BUILDFLAG(ENABLE_WEBRTC) #if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* webrtc_log_uploader() override; WebRtcLogUploader* webrtc_log_uploader() override;
#endif #endif
...@@ -215,7 +214,6 @@ class BrowserProcessImpl : public BrowserProcess, ...@@ -215,7 +214,6 @@ class BrowserProcessImpl : public BrowserProcess,
bool created_profile_manager_; bool created_profile_manager_;
std::unique_ptr<ProfileManager> profile_manager_; std::unique_ptr<ProfileManager> profile_manager_;
bool created_local_state_;
std::unique_ptr<PrefService> local_state_; std::unique_ptr<PrefService> local_state_;
bool created_icon_manager_; bool created_icon_manager_;
......
...@@ -372,10 +372,6 @@ MediaFileSystemRegistry* TestingBrowserProcess::media_file_system_registry() { ...@@ -372,10 +372,6 @@ MediaFileSystemRegistry* TestingBrowserProcess::media_file_system_registry() {
#endif #endif
} }
bool TestingBrowserProcess::created_local_state() const {
return (local_state_ != nullptr);
}
#if BUILDFLAG(ENABLE_WEBRTC) #if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* TestingBrowserProcess::webrtc_log_uploader() { WebRtcLogUploader* TestingBrowserProcess::webrtc_log_uploader() {
return nullptr; return nullptr;
......
...@@ -121,7 +121,6 @@ class TestingBrowserProcess : public BrowserProcess { ...@@ -121,7 +121,6 @@ class TestingBrowserProcess : public BrowserProcess {
component_updater::SupervisedUserWhitelistInstaller* component_updater::SupervisedUserWhitelistInstaller*
supervised_user_whitelist_installer() override; supervised_user_whitelist_installer() override;
MediaFileSystemRegistry* media_file_system_registry() override; MediaFileSystemRegistry* media_file_system_registry() override;
bool created_local_state() const override;
#if BUILDFLAG(ENABLE_WEBRTC) #if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* webrtc_log_uploader() override; WebRtcLogUploader* webrtc_log_uploader() override;
......
...@@ -62,8 +62,7 @@ ApplicationContextImpl::ApplicationContextImpl( ...@@ -62,8 +62,7 @@ ApplicationContextImpl::ApplicationContextImpl(
const base::CommandLine& command_line, const base::CommandLine& command_line,
const std::string& locale) const std::string& locale)
: local_state_task_runner_(local_state_task_runner), : local_state_task_runner_(local_state_task_runner),
was_last_shutdown_clean_(false), was_last_shutdown_clean_(false) {
created_local_state_(false) {
DCHECK(!GetApplicationContext()); DCHECK(!GetApplicationContext());
SetApplicationContext(this); SetApplicationContext(this);
...@@ -186,7 +185,7 @@ bool ApplicationContextImpl::WasLastShutdownClean() { ...@@ -186,7 +185,7 @@ bool ApplicationContextImpl::WasLastShutdownClean() {
PrefService* ApplicationContextImpl::GetLocalState() { PrefService* ApplicationContextImpl::GetLocalState() {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
if (!created_local_state_) if (!local_state_)
CreateLocalState(); CreateLocalState();
return local_state_.get(); return local_state_.get();
} }
...@@ -316,8 +315,7 @@ void ApplicationContextImpl::SetApplicationLocale(const std::string& locale) { ...@@ -316,8 +315,7 @@ void ApplicationContextImpl::SetApplicationLocale(const std::string& locale) {
void ApplicationContextImpl::CreateLocalState() { void ApplicationContextImpl::CreateLocalState() {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!created_local_state_ && !local_state_); DCHECK(!local_state_);
created_local_state_ = true;
base::FilePath local_state_path; base::FilePath local_state_path;
CHECK(PathService::Get(ios::FILE_LOCAL_STATE, &local_state_path)); CHECK(PathService::Get(ios::FILE_LOCAL_STATE, &local_state_path));
...@@ -328,6 +326,7 @@ void ApplicationContextImpl::CreateLocalState() { ...@@ -328,6 +326,7 @@ void ApplicationContextImpl::CreateLocalState() {
local_state_ = ::CreateLocalState( local_state_ = ::CreateLocalState(
local_state_path, local_state_task_runner_.get(), pref_registry); local_state_path, local_state_task_runner_.get(), pref_registry);
DCHECK(local_state_);
net::ClientSocketPoolManager::set_max_sockets_per_proxy_server( net::ClientSocketPoolManager::set_max_sockets_per_proxy_server(
net::HttpNetworkSession::NORMAL_SOCKET_POOL, net::HttpNetworkSession::NORMAL_SOCKET_POOL,
......
...@@ -91,7 +91,6 @@ class ApplicationContextImpl : public ApplicationContext { ...@@ -91,7 +91,6 @@ class ApplicationContextImpl : public ApplicationContext {
const scoped_refptr<base::SequencedTaskRunner> local_state_task_runner_; const scoped_refptr<base::SequencedTaskRunner> local_state_task_runner_;
bool was_last_shutdown_clean_; bool was_last_shutdown_clean_;
bool created_local_state_;
DISALLOW_COPY_AND_ASSIGN(ApplicationContextImpl); 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