OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SETTINGS_RESET_SETTINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" | 15 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" |
16 | 16 |
17 namespace base { | 17 namespace base { |
18 class DictionaryValue; | 18 class DictionaryValue; |
19 class ListValue; | 19 class ListValue; |
20 } // namespace base | 20 } // namespace base |
21 | 21 |
22 namespace content { | 22 namespace content { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Sets a pref indicating that a factory reset is requested and then requests | 83 // Sets a pref indicating that a factory reset is requested and then requests |
84 // a restart. | 84 // a restart. |
85 void HandleFactoryResetRestart(const base::ListValue* args); | 85 void HandleFactoryResetRestart(const base::ListValue* args); |
86 | 86 |
87 // Whether factory reset can be performed. | 87 // Whether factory reset can be performed. |
88 bool allow_powerwash_ = false; | 88 bool allow_powerwash_ = false; |
89 #endif // defined(OS_CHROMEOS) | 89 #endif // defined(OS_CHROMEOS) |
90 | 90 |
91 Profile* const profile_; | 91 Profile* const profile_; |
92 | 92 |
93 scoped_ptr<ProfileResetter> resetter_; | 93 std::unique_ptr<ProfileResetter> resetter_; |
94 | 94 |
95 scoped_ptr<BrandcodeConfigFetcher> config_fetcher_; | 95 std::unique_ptr<BrandcodeConfigFetcher> config_fetcher_; |
96 | 96 |
97 // Snapshot of settings before profile was reseted. | 97 // Snapshot of settings before profile was reseted. |
98 scoped_ptr<ResettableSettingsSnapshot> setting_snapshot_; | 98 std::unique_ptr<ResettableSettingsSnapshot> setting_snapshot_; |
99 | 99 |
100 // Contains Chrome brand code; empty for organic Chrome. | 100 // Contains Chrome brand code; empty for organic Chrome. |
101 std::string brandcode_; | 101 std::string brandcode_; |
102 | 102 |
103 base::WeakPtrFactory<ResetSettingsHandler> weak_ptr_factory_; | 103 base::WeakPtrFactory<ResetSettingsHandler> weak_ptr_factory_; |
104 | 104 |
105 DISALLOW_COPY_AND_ASSIGN(ResetSettingsHandler); | 105 DISALLOW_COPY_AND_ASSIGN(ResetSettingsHandler); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace settings | 108 } // namespace settings |
109 | 109 |
110 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ | 110 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_RESET_SETTINGS_HANDLER_H_ |
OLD | NEW |