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

Side by Side Diff: chrome/browser/chromeos/cros_settings.h

Issue 5734002: Continuation of CL 5685007, rename the singleton accessor method in more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_SETTINGS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_SETTINGS_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_SETTINGS_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_SETTINGS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/hash_tables.h" 12 #include "base/hash_tables.h"
13 #include "base/non_thread_safe.h" 13 #include "base/non_thread_safe.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "base/singleton.h" 15 #include "base/singleton.h"
16 #include "chrome/browser/chromeos/cros_settings_names.h" 16 #include "chrome/browser/chromeos/cros_settings_names.h"
17 #include "chrome/common/notification_observer.h" 17 #include "chrome/common/notification_observer.h"
18 18
19 namespace base {
20 template <typename T> struct DefaultLazyInstanceTraits;
21 }
22
19 class Value; 23 class Value;
20 24
21 namespace chromeos { 25 namespace chromeos {
22 26
23 class CrosSettingsProvider; 27 class CrosSettingsProvider;
24 28
25 // A class manages per-device/global settings. 29 // A class manages per-device/global settings.
26 class CrosSettings : public NonThreadSafe { 30 class CrosSettings : public NonThreadSafe {
27 public: 31 public:
28 // Class factory. 32 // Class factory.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // A map from settings names to a list of observers. Observers get fired in 77 // A map from settings names to a list of observers. Observers get fired in
74 // the order they are added. 78 // the order they are added.
75 typedef ObserverList<NotificationObserver> NotificationObserverList; 79 typedef ObserverList<NotificationObserver> NotificationObserverList;
76 typedef base::hash_map<std::string, NotificationObserverList*> 80 typedef base::hash_map<std::string, NotificationObserverList*>
77 SettingsObserverMap; 81 SettingsObserverMap;
78 SettingsObserverMap settings_observers_; 82 SettingsObserverMap settings_observers_;
79 83
80 CrosSettings(); 84 CrosSettings();
81 ~CrosSettings(); 85 ~CrosSettings();
82 CrosSettingsProvider* GetProvider(const std::string& path) const; 86 CrosSettingsProvider* GetProvider(const std::string& path) const;
83 friend struct DefaultSingletonTraits<CrosSettings>; 87 friend struct base::DefaultLazyInstanceTraits<CrosSettings>;
84 88
85 DISALLOW_COPY_AND_ASSIGN(CrosSettings); 89 DISALLOW_COPY_AND_ASSIGN(CrosSettings);
86 }; 90 };
87 91
88 } // namespace chromeos 92 } // namespace chromeos
89 93
90 #endif // CHROME_BROWSER_CHROMEOS_CROS_SETTINGS_H_ 94 #endif // CHROME_BROWSER_CHROMEOS_CROS_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698