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

Side by Side Diff: chromecast/common/chromecast_config.h

Issue 603243003: Chromecast: provides a method to check if config has been set by user. (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 unified diff | Download patch
« no previous file with comments | « no previous file | chromecast/common/chromecast_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // Chromecast-specific configurations retrieved from and stored into a given 5 // Chromecast-specific configurations retrieved from and stored into a given
6 // configuration file. 6 // configuration file.
7 7
8 #ifndef CHROMECAST_COMMON_CHROMECAST_CONFIG_H_ 8 #ifndef CHROMECAST_COMMON_CHROMECAST_CONFIG_H_
9 #define CHROMECAST_COMMON_CHROMECAST_CONFIG_H_ 9 #define CHROMECAST_COMMON_CHROMECAST_CONFIG_H_
10 10
(...skipping 19 matching lines...) Expand all
30 public: 30 public:
31 // Creates new singleton instance of ChromecastConfig. 31 // Creates new singleton instance of ChromecastConfig.
32 static void Create(PrefRegistrySimple* registry); 32 static void Create(PrefRegistrySimple* registry);
33 33
34 // Returns the singleton instance of ChromecastConfig. 34 // Returns the singleton instance of ChromecastConfig.
35 static ChromecastConfig* GetInstance(); 35 static ChromecastConfig* GetInstance();
36 36
37 // Saves configs into configuration file. 37 // Saves configs into configuration file.
38 void Save() const; 38 void Save() const;
39 39
40 // Returns string value for key, if present. 40 // Returns string value for |key|, if present.
41 const std::string GetValue(const std::string& key) const; 41 const std::string GetValue(const std::string& key) const;
42 42
43 // Returns integer value for key, if present. 43 // Returns integer value for |key|, if present.
44 const int GetIntValue(const std::string& key) const; 44 const int GetIntValue(const std::string& key) const;
45 45
46 // Sets new string value for key. 46 // Sets new string value for |key|.
47 void SetValue(const std::string& key, const std::string& value) const; 47 void SetValue(const std::string& key, const std::string& value) const;
48 48
49 // Sets new int value for key. 49 // Sets new int value for |key|.
50 void SetIntValue(const std::string& key, int value) const; 50 void SetIntValue(const std::string& key, int value) const;
51 51
52 // Whether or not a value has been set for |key|.
53 bool HasValue(const std::string& key) const;
54
52 scoped_refptr<base::SequencedWorkerPool> worker_pool() const { 55 scoped_refptr<base::SequencedWorkerPool> worker_pool() const {
53 return worker_pool_; 56 return worker_pool_;
54 } 57 }
55 58
56 PrefService* pref_service() const { return pref_service_.get(); } 59 PrefService* pref_service() const { return pref_service_.get(); }
57 60
58 private: 61 private:
59 ChromecastConfig(); 62 ChromecastConfig();
60 ~ChromecastConfig(); 63 ~ChromecastConfig();
61 64
(...skipping 11 matching lines...) Expand all
73 scoped_ptr<PrefService> pref_service_; 76 scoped_ptr<PrefService> pref_service_;
74 77
75 base::ThreadChecker thread_checker_; 78 base::ThreadChecker thread_checker_;
76 79
77 DISALLOW_COPY_AND_ASSIGN(ChromecastConfig); 80 DISALLOW_COPY_AND_ASSIGN(ChromecastConfig);
78 }; 81 };
79 82
80 } // namespace chromecast 83 } // namespace chromecast
81 84
82 #endif // CHROMECAST_COMMON_CHROMECAST_CONFIG_H_ 85 #endif // CHROMECAST_COMMON_CHROMECAST_CONFIG_H_
OLDNEW
« no previous file with comments | « no previous file | chromecast/common/chromecast_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698