| 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 #include "chrome/browser/profile_resetter/resettable_settings_snapshot.h" | 5 #include "chrome/browser/profile_resetter/resettable_settings_snapshot.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 base::ASCIIToUTF16("\'"), &arguments); | 208 base::ASCIIToUTF16("\'"), &arguments); |
| 209 list->AppendString(arguments); | 209 list->AppendString(arguments); |
| 210 } | 210 } |
| 211 dict.Set(kShortcuts, list); | 211 dict.Set(kShortcuts, list); |
| 212 } | 212 } |
| 213 | 213 |
| 214 static_assert(ResettableSettingsSnapshot::ALL_FIELDS == 31, | 214 static_assert(ResettableSettingsSnapshot::ALL_FIELDS == 31, |
| 215 "new field needs to be serialized here"); | 215 "new field needs to be serialized here"); |
| 216 | 216 |
| 217 std::string json; | 217 std::string json; |
| 218 base::JSONWriter::Write(&dict, &json); | 218 base::JSONWriter::Write(dict, &json); |
| 219 return json; | 219 return json; |
| 220 } | 220 } |
| 221 | 221 |
| 222 void SendSettingsFeedback(const std::string& report, | 222 void SendSettingsFeedback(const std::string& report, |
| 223 Profile* profile, | 223 Profile* profile, |
| 224 SnapshotCaller caller) { | 224 SnapshotCaller caller) { |
| 225 scoped_refptr<FeedbackData> feedback_data = new FeedbackData(); | 225 scoped_refptr<FeedbackData> feedback_data = new FeedbackData(); |
| 226 std::string bucket; | 226 std::string bucket; |
| 227 switch (caller) { | 227 switch (caller) { |
| 228 case PROFILE_RESET_WEBUI: | 228 case PROFILE_RESET_WEBUI: |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 extension_names += '\n'; | 359 extension_names += '\n'; |
| 360 extension_names += i->second; | 360 extension_names += i->second; |
| 361 } | 361 } |
| 362 if (!extension_names.empty()) { | 362 if (!extension_names.empty()) { |
| 363 AddPair(list.get(), | 363 AddPair(list.get(), |
| 364 l10n_util::GetStringUTF16(IDS_RESET_PROFILE_SETTINGS_EXTENSIONS), | 364 l10n_util::GetStringUTF16(IDS_RESET_PROFILE_SETTINGS_EXTENSIONS), |
| 365 extension_names); | 365 extension_names); |
| 366 } | 366 } |
| 367 return list.Pass(); | 367 return list.Pass(); |
| 368 } | 368 } |
| OLD | NEW |