OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ | 5 #ifndef CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ |
6 #define CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ | 6 #define CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 bool shortcuts_determined_; | 107 bool shortcuts_determined_; |
108 | 108 |
109 // The flag to cancel shortcuts retrieving. | 109 // The flag to cancel shortcuts retrieving. |
110 scoped_refptr<SharedCancellationFlag> cancellation_flag_; | 110 scoped_refptr<SharedCancellationFlag> cancellation_flag_; |
111 | 111 |
112 base::WeakPtrFactory<ResettableSettingsSnapshot> weak_ptr_factory_; | 112 base::WeakPtrFactory<ResettableSettingsSnapshot> weak_ptr_factory_; |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(ResettableSettingsSnapshot); | 114 DISALLOW_COPY_AND_ASSIGN(ResettableSettingsSnapshot); |
115 }; | 115 }; |
116 | 116 |
| 117 // The caller of ResettableSettingsSnapshot. |
| 118 enum SnapshotCaller { |
| 119 PROFILE_RESET_WEBUI = 0, |
| 120 PROFILE_RESET_PROMPT, |
| 121 }; |
| 122 |
117 // Serializes specified |snapshot| members to JSON format. |field_mask| is a bit | 123 // Serializes specified |snapshot| members to JSON format. |field_mask| is a bit |
118 // mask of ResettableSettingsSnapshot::Field values. | 124 // mask of ResettableSettingsSnapshot::Field values. |
119 std::string SerializeSettingsReport(const ResettableSettingsSnapshot& snapshot, | 125 std::string SerializeSettingsReport(const ResettableSettingsSnapshot& snapshot, |
120 int field_mask); | 126 int field_mask); |
121 | 127 |
122 // Sends |report| as a feedback. |report| is supposed to be result of | 128 // Sends |report| as a feedback. |report| is supposed to be result of |
123 // SerializeSettingsReport(). | 129 // SerializeSettingsReport(). |
124 void SendSettingsFeedback(const std::string& report, | 130 void SendSettingsFeedback(const std::string& report, |
125 Profile* profile); | 131 Profile* profile, |
| 132 SnapshotCaller caller); |
126 | 133 |
127 // Returns list of key/value pairs for all available reported information | 134 // Returns list of key/value pairs for all available reported information |
128 // from the |profile| and some additional fields. | 135 // from the |profile| and some additional fields. |
129 scoped_ptr<base::ListValue> GetReadableFeedbackForSnapshot( | 136 scoped_ptr<base::ListValue> GetReadableFeedbackForSnapshot( |
130 Profile* profile, | 137 Profile* profile, |
131 const ResettableSettingsSnapshot& snapshot); | 138 const ResettableSettingsSnapshot& snapshot); |
132 | 139 |
133 #endif // CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ | 140 #endif // CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ |
OLD | NEW |