| 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" |
| 11 #include "chrome/browser/metrics/metrics_service.h" | 11 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
| 12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
| 13 #include "chrome/browser/sync/about_sync_util.h" | 13 #include "chrome/browser/sync/about_sync_util.h" |
| 14 #include "chrome/browser/sync/profile_sync_service_factory.h" | 14 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 15 #include "chrome/common/chrome_version_info.h" | 15 #include "chrome/common/chrome_version_info.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "extensions/browser/extension_system.h" | 17 #include "extensions/browser/extension_system.h" |
| 18 #include "extensions/common/extension.h" | 18 #include "extensions/common/extension.h" |
| 19 #include "extensions/common/extension_set.h" | 19 #include "extensions/common/extension_set.h" |
| 20 | 20 |
| 21 | 21 |
| (...skipping 65 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 (!ChromeMetricsServiceAccessor::IsCrashReportingEnabled()) |
| 98 return; | 98 return; |
| 99 | 99 |
| 100 Profile* primary_profile = | 100 Profile* primary_profile = |
| 101 g_browser_process->profile_manager()->GetPrimaryUserProfile(); | 101 g_browser_process->profile_manager()->GetPrimaryUserProfile(); |
| 102 if (!primary_profile) | 102 if (!primary_profile) |
| 103 return; | 103 return; |
| 104 | 104 |
| 105 ExtensionService* service = | 105 ExtensionService* service = |
| 106 extensions::ExtensionSystem::Get(primary_profile)->extension_service(); | 106 extensions::ExtensionSystem::Get(primary_profile)->extension_service(); |
| 107 if (!service) | 107 if (!service) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 if (!extensions_list.empty()) | 122 if (!extensions_list.empty()) |
| 123 extensions_list += "\n"; | 123 extensions_list += "\n"; |
| 124 | 124 |
| 125 if (!extensions_list.empty()) | 125 if (!extensions_list.empty()) |
| 126 (*response)[kExtensionsListKey] = extensions_list; | 126 (*response)[kExtensionsListKey] = extensions_list; |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace system_logs | 129 } // namespace system_logs |
| OLD | NEW |