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

Side by Side Diff: chrome/browser/chromeos/settings/cros_settings.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/settings/cros_settings.h" 5 #include "chrome/browser/chromeos/settings/cros_settings.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 CrosSettings* CrosSettings::Get() { 43 CrosSettings* CrosSettings::Get() {
44 CHECK(g_cros_settings); 44 CHECK(g_cros_settings);
45 return g_cros_settings; 45 return g_cros_settings;
46 } 46 }
47 47
48 CrosSettings::CrosSettings(DeviceSettingsService* device_settings_service) { 48 CrosSettings::CrosSettings(DeviceSettingsService* device_settings_service) {
49 CrosSettingsProvider::NotifyObserversCallback notify_cb( 49 CrosSettingsProvider::NotifyObserversCallback notify_cb(
50 base::Bind(&CrosSettings::FireObservers, 50 base::Bind(&CrosSettings::FireObservers,
51 // This is safe since |this| is never deleted. 51 // This is safe since |this| is never deleted.
52 base::Unretained(this))); 52 base::Unretained(this)));
53 if (CommandLine::ForCurrentProcess()->HasSwitch( 53 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
54 switches::kStubCrosSettings)) { 54 switches::kStubCrosSettings)) {
55 AddSettingsProvider(new StubCrosSettingsProvider(notify_cb)); 55 AddSettingsProvider(new StubCrosSettingsProvider(notify_cb));
56 } else { 56 } else {
57 AddSettingsProvider( 57 AddSettingsProvider(
58 new DeviceSettingsProvider(notify_cb, device_settings_service)); 58 new DeviceSettingsProvider(notify_cb, device_settings_service));
59 } 59 }
60 // System settings are not mocked currently. 60 // System settings are not mocked currently.
61 AddSettingsProvider(new SystemSettingsProvider(notify_cb)); 61 AddSettingsProvider(new SystemSettingsProvider(notify_cb));
62 } 62 }
63 63
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 ScopedTestCrosSettings::ScopedTestCrosSettings() { 322 ScopedTestCrosSettings::ScopedTestCrosSettings() {
323 CrosSettings::Initialize(); 323 CrosSettings::Initialize();
324 } 324 }
325 325
326 ScopedTestCrosSettings::~ScopedTestCrosSettings() { 326 ScopedTestCrosSettings::~ScopedTestCrosSettings() {
327 CrosSettings::Shutdown(); 327 CrosSettings::Shutdown();
328 } 328 }
329 329
330 } // namespace chromeos 330 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/browser/chromeos/settings/owner_flags_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698