| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/cros_settings.h" | 5 #include "chrome/browser/chromeos/cros_settings.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/chromeos/cros_settings_provider.h" | 11 #include "chrome/browser/chromeos/cros_settings_provider.h" |
| 12 #include "chrome/browser/chromeos/user_cros_settings_provider.h" | 12 #include "chrome/browser/chromeos/user_cros_settings_provider.h" |
| 13 #include "chrome/common/chrome_notification_types.h" | 13 #include "chrome/common/chrome_notification_types.h" |
| 14 #include "content/public/browser/notification_details.h" | 14 #include "content/public/browser/notification_details.h" |
| 15 #include "content/public/browser/notification_source.h" | 15 #include "content/public/browser/notification_source.h" |
| 16 #include "content/public/browser/notification_types.h" | 16 #include "content/public/browser/notification_types.h" |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| 19 | 19 |
| 20 static base::LazyInstance<CrosSettings> g_cros_settings( | 20 static base::LazyInstance<CrosSettings> g_cros_settings = |
| 21 base::LINKER_INITIALIZED); | 21 LAZY_INSTANCE_INITIALIZER; |
| 22 | 22 |
| 23 CrosSettings* CrosSettings::Get() { | 23 CrosSettings* CrosSettings::Get() { |
| 24 // TODO(xiyaun): Use real stuff when underlying libcros is ready. | 24 // TODO(xiyaun): Use real stuff when underlying libcros is ready. |
| 25 return g_cros_settings.Pointer(); | 25 return g_cros_settings.Pointer(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool CrosSettings::IsCrosSettings(const std::string& path) { | 28 bool CrosSettings::IsCrosSettings(const std::string& path) { |
| 29 return StartsWithASCII(path, kCrosSettingsPrefix, true); | 29 return StartsWithASCII(path, kCrosSettingsPrefix, true); |
| 30 } | 30 } |
| 31 | 31 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 205 |
| 206 CrosSettings::CrosSettings() { | 206 CrosSettings::CrosSettings() { |
| 207 } | 207 } |
| 208 | 208 |
| 209 CrosSettings::~CrosSettings() { | 209 CrosSettings::~CrosSettings() { |
| 210 DCHECK(providers_.empty()); | 210 DCHECK(providers_.empty()); |
| 211 STLDeleteValues(&settings_observers_); | 211 STLDeleteValues(&settings_observers_); |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace chromeos | 214 } // namespace chromeos |
| OLD | NEW |