| 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/sys_info.h" | 8 #include "base/sys_info.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // Add sync logs to logs. | 87 // Add sync logs to logs. |
| 88 std::string sync_logs_string; | 88 std::string sync_logs_string; |
| 89 JSONStringValueSerializer serializer(&sync_logs_string); | 89 JSONStringValueSerializer serializer(&sync_logs_string); |
| 90 serializer.Serialize(*sync_logs.get()); | 90 serializer.Serialize(*sync_logs.get()); |
| 91 | 91 |
| 92 (*response)[kSyncDataKey] = sync_logs_string; | 92 (*response)[kSyncDataKey] = sync_logs_string; |
| 93 } | 93 } |
| 94 | 94 |
| 95 void ChromeInternalLogSource::PopulateExtensionInfoLogs( | 95 void ChromeInternalLogSource::PopulateExtensionInfoLogs( |
| 96 SystemLogsResponse* response) { | 96 SystemLogsResponse* response) { |
| 97 if (!MetricsServiceHelper::IsCrashReportingEnabled()) | 97 if (!MetricsServiceHelper::IsCrashReportingEnabled( |
| 98 g_browser_process->local_state())) |
| 98 return; | 99 return; |
| 99 | 100 |
| 100 Profile* primary_profile = | 101 Profile* primary_profile = |
| 101 g_browser_process->profile_manager()->GetPrimaryUserProfile(); | 102 g_browser_process->profile_manager()->GetPrimaryUserProfile(); |
| 102 if (!primary_profile) | 103 if (!primary_profile) |
| 103 return; | 104 return; |
| 104 | 105 |
| 105 ExtensionService* service = | 106 ExtensionService* service = |
| 106 extensions::ExtensionSystem::Get(primary_profile)->extension_service(); | 107 extensions::ExtensionSystem::Get(primary_profile)->extension_service(); |
| 107 if (!service) | 108 if (!service) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 120 } | 121 } |
| 121 } | 122 } |
| 122 if (!extensions_list.empty()) | 123 if (!extensions_list.empty()) |
| 123 extensions_list += "\n"; | 124 extensions_list += "\n"; |
| 124 | 125 |
| 125 if (!extensions_list.empty()) | 126 if (!extensions_list.empty()) |
| 126 (*response)[kExtensionsListKey] = extensions_list; | 127 (*response)[kExtensionsListKey] = extensions_list; |
| 127 } | 128 } |
| 128 | 129 |
| 129 } // namespace system_logs | 130 } // namespace system_logs |
| OLD | NEW |