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 #include "chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_so
urce.h" | 5 #include "chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_so
urce.h" |
6 | 6 |
7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
10 #include "base/task_scheduler/post_task.h" | 10 #include "base/task_scheduler/post_task.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 (*response)[kDataReductionProxyKey] = is_data_reduction_proxy_enabled ? | 246 (*response)[kDataReductionProxyKey] = is_data_reduction_proxy_enabled ? |
247 "enabled" : "disabled"; | 247 "enabled" : "disabled"; |
248 } | 248 } |
249 | 249 |
250 #if defined(OS_CHROMEOS) | 250 #if defined(OS_CHROMEOS) |
251 void ChromeInternalLogSource::PopulateLocalStateSettings( | 251 void ChromeInternalLogSource::PopulateLocalStateSettings( |
252 SystemLogsResponse* response) { | 252 SystemLogsResponse* response) { |
253 // Extract the "settings" entry in the local state and serialize back to | 253 // Extract the "settings" entry in the local state and serialize back to |
254 // a string. | 254 // a string. |
255 std::unique_ptr<base::DictionaryValue> local_state = | 255 std::unique_ptr<base::DictionaryValue> local_state = |
256 g_browser_process->local_state()->GetPreferenceValuesOmitDefaults(); | 256 g_browser_process->local_state()->GetPreferenceValues( |
| 257 PrefService::EXCLUDE_DEFAULTS); |
257 const base::DictionaryValue* local_state_settings = nullptr; | 258 const base::DictionaryValue* local_state_settings = nullptr; |
258 if (!local_state->GetDictionary(kSettingsKey, &local_state_settings)) { | 259 if (!local_state->GetDictionary(kSettingsKey, &local_state_settings)) { |
259 VLOG(1) << "Failed to extract the settings entry from Local State."; | 260 VLOG(1) << "Failed to extract the settings entry from Local State."; |
260 return; | 261 return; |
261 } | 262 } |
262 std::string serialized_settings; | 263 std::string serialized_settings; |
263 JSONStringValueSerializer serializer(&serialized_settings); | 264 JSONStringValueSerializer serializer(&serialized_settings); |
264 if (!serializer.Serialize(*local_state_settings)) | 265 if (!serializer.Serialize(*local_state_settings)) |
265 return; | 266 return; |
266 | 267 |
(...skipping 21 matching lines...) Expand all Loading... |
288 void ChromeInternalLogSource::PopulateInstallerBrandCode( | 289 void ChromeInternalLogSource::PopulateInstallerBrandCode( |
289 SystemLogsResponse* response) { | 290 SystemLogsResponse* response) { |
290 std::string brand; | 291 std::string brand; |
291 google_brand::GetBrand(&brand); | 292 google_brand::GetBrand(&brand); |
292 (*response)[kInstallerBrandCode] = | 293 (*response)[kInstallerBrandCode] = |
293 brand.empty() ? "Unknown brand code" : brand; | 294 brand.empty() ? "Unknown brand code" : brand; |
294 } | 295 } |
295 #endif | 296 #endif |
296 | 297 |
297 } // namespace system_logs | 298 } // namespace system_logs |
OLD | NEW |