Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.cc

Issue 640063008: Revert of Implemented OwnerSettingsService::Set() method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.cc
diff --git a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.cc b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.cc
index afe0480125f43757531956af0d18206dd6c0ac29..b971f3407aee5953c657ed4ca0677ff88650a47b 100644
--- a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.cc
+++ b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.cc
@@ -7,7 +7,6 @@
#include "base/path_service.h"
#include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
-#include "chrome/browser/chromeos/settings/device_settings_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chromeos/chromeos_paths.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
@@ -15,19 +14,6 @@
#include "components/ownership/owner_key_util_impl.h"
namespace chromeos {
-
-namespace {
-
-DeviceSettingsService* g_device_settings_service_for_testing_ = nullptr;
-
-DeviceSettingsService* GetDeviceSettingsService() {
- if (g_device_settings_service_for_testing_)
- return g_device_settings_service_for_testing_;
- return DeviceSettingsService::IsInitialized() ? DeviceSettingsService::Get()
- : nullptr;
-}
-
-} // namespace
OwnerSettingsServiceChromeOSFactory::OwnerSettingsServiceChromeOSFactory()
: BrowserContextKeyedServiceFactory(
@@ -49,12 +35,6 @@
OwnerSettingsServiceChromeOSFactory*
OwnerSettingsServiceChromeOSFactory::GetInstance() {
return Singleton<OwnerSettingsServiceChromeOSFactory>::get();
-}
-
-// static
-void OwnerSettingsServiceChromeOSFactory::SetDeviceSettingsServiceForTesting(
- DeviceSettingsService* device_settings_service) {
- g_device_settings_service_for_testing_ = device_settings_service;
}
scoped_refptr<ownership::OwnerKeyUtil>
@@ -79,10 +59,8 @@
Profile* profile = static_cast<Profile*>(browser_context);
if (profile->IsGuestSession() || ProfileHelper::IsSigninProfile(profile))
return NULL;
- return new OwnerSettingsServiceChromeOS(
- GetDeviceSettingsService(),
- profile,
- GetInstance()->GetOwnerKeyUtil());
+ return new OwnerSettingsServiceChromeOS(profile,
+ GetInstance()->GetOwnerKeyUtil());
}
bool OwnerSettingsServiceChromeOSFactory::ServiceIsCreatedWithBrowserContext()

Powered by Google App Engine
This is Rietveld 408576698