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_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_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 "chrome/browser/ui/webui/options/options_ui.h" | 14 #include "chrome/browser/ui/webui/options/options_ui.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class DictionaryValue; | 17 class DictionaryValue; |
18 class ListValue; | 18 class ListValue; |
19 } // namespace base | 19 } // namespace base |
20 | 20 |
21 class BrandcodeConfigFetcher; | 21 class BrandcodeConfigFetcher; |
22 class ProfileResetter; | 22 class ProfileResetter; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // Called when BrandcodeConfigFetcher completed fetching settings. | 57 // Called when BrandcodeConfigFetcher completed fetching settings. |
58 void OnSettingsFetched(); | 58 void OnSettingsFetched(); |
59 | 59 |
60 // Resets profile settings to default values. |send_settings| is true if user | 60 // Resets profile settings to default values. |send_settings| is true if user |
61 // gave his consent to upload broken settings to Google for analysis. | 61 // gave his consent to upload broken settings to Google for analysis. |
62 void ResetProfile(bool send_settings); | 62 void ResetProfile(bool send_settings); |
63 | 63 |
64 // Sets new values for the feedback area. | 64 // Sets new values for the feedback area. |
65 void UpdateFeedbackUI(); | 65 void UpdateFeedbackUI(); |
66 | 66 |
67 scoped_ptr<ProfileResetter> resetter_; | 67 std::unique_ptr<ProfileResetter> resetter_; |
68 | 68 |
69 scoped_ptr<BrandcodeConfigFetcher> config_fetcher_; | 69 std::unique_ptr<BrandcodeConfigFetcher> config_fetcher_; |
70 | 70 |
71 // Snapshot of settings before profile was reseted. | 71 // Snapshot of settings before profile was reseted. |
72 scoped_ptr<ResettableSettingsSnapshot> setting_snapshot_; | 72 std::unique_ptr<ResettableSettingsSnapshot> setting_snapshot_; |
73 | 73 |
74 // Contains Chrome brand code; empty for organic Chrome. | 74 // Contains Chrome brand code; empty for organic Chrome. |
75 std::string brandcode_; | 75 std::string brandcode_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(ResetProfileSettingsHandler); | 77 DISALLOW_COPY_AND_ASSIGN(ResetProfileSettingsHandler); |
78 }; | 78 }; |
79 | 79 |
80 } // namespace options | 80 } // namespace options |
81 | 81 |
82 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ | 82 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_RESET_PROFILE_SETTINGS_HANDLER_H_ |
OLD | NEW |