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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: No ListValue::SetDouble Created 3 years, 8 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLER_H _ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLER_H _
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLER_H _ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLER_H _
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 11
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/linked_ptr.h" 13 #include "base/memory/linked_ptr.h"
13 #include "chrome/browser/chromeos/settings/cros_settings.h" 14 #include "chrome/browser/chromeos/settings/cros_settings.h"
14 #include "chrome/browser/ui/webui/options/core_options_handler.h" 15 #include "chrome/browser/ui/webui/options/core_options_handler.h"
15 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
17 18
18 namespace chromeos { 19 namespace chromeos {
19 namespace options { 20 namespace options {
20 21
21 // CoreChromeOSOptionsHandler handles ChromeOS settings. 22 // CoreChromeOSOptionsHandler handles ChromeOS settings.
22 class CoreChromeOSOptionsHandler : public ::options::CoreOptionsHandler, 23 class CoreChromeOSOptionsHandler : public ::options::CoreOptionsHandler,
23 public content::NotificationObserver { 24 public content::NotificationObserver {
24 public: 25 public:
25 CoreChromeOSOptionsHandler(); 26 CoreChromeOSOptionsHandler();
26 ~CoreChromeOSOptionsHandler() override; 27 ~CoreChromeOSOptionsHandler() override;
27 28
28 // ::CoreOptionsHandler overrides 29 // ::CoreOptionsHandler overrides
29 void RegisterMessages() override; 30 void RegisterMessages() override;
30 base::Value* FetchPref(const std::string& pref_name) override; 31 std::unique_ptr<base::Value> FetchPref(const std::string& pref_name) override;
31 void InitializeHandler() override; 32 void InitializeHandler() override;
32 void ObservePref(const std::string& pref_name) override; 33 void ObservePref(const std::string& pref_name) override;
33 void SetPref(const std::string& pref_name, 34 void SetPref(const std::string& pref_name,
34 const base::Value* value, 35 const base::Value* value,
35 const std::string& metric) override; 36 const std::string& metric) override;
36 void StopObservingPref(const std::string& path) override; 37 void StopObservingPref(const std::string& path) override;
37 base::Value* CreateValueForPref( 38 std::unique_ptr<base::Value> CreateValueForPref(
38 const std::string& pref_name, 39 const std::string& pref_name,
39 const std::string& controlling_pref_name) override; 40 const std::string& controlling_pref_name) override;
40 41
41 // OptionsPageUIHandler implementation. 42 // OptionsPageUIHandler implementation.
42 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; 43 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
43 44
44 // content::NotificationObserver implementation. 45 // content::NotificationObserver implementation.
45 void Observe(int type, 46 void Observe(int type,
46 const content::NotificationSource& source, 47 const content::NotificationSource& source,
47 const content::NotificationDetails& details) override; 48 const content::NotificationDetails& details) override;
(...skipping 23 matching lines...) Expand all
71 // Currently selected network id. 72 // Currently selected network id.
72 std::string network_guid_; 73 std::string network_guid_;
73 74
74 DISALLOW_COPY_AND_ASSIGN(CoreChromeOSOptionsHandler); 75 DISALLOW_COPY_AND_ASSIGN(CoreChromeOSOptionsHandler);
75 }; 76 };
76 77
77 } // namespace options 78 } // namespace options
78 } // namespace chromeos 79 } // namespace chromeos
79 80
80 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLE R_H_ 81 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698