| 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/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 namespace system_logs { | 35 namespace system_logs { |
| 36 | 36 |
| 37 ChromeInternalLogSource::ChromeInternalLogSource() | 37 ChromeInternalLogSource::ChromeInternalLogSource() |
| 38 : SystemLogsSource("ChromeInternal") { | 38 : SystemLogsSource("ChromeInternal") { |
| 39 } | 39 } |
| 40 | 40 |
| 41 ChromeInternalLogSource::~ChromeInternalLogSource() { | 41 ChromeInternalLogSource::~ChromeInternalLogSource() { |
| 42 } | 42 } |
| 43 | 43 |
| 44 void ChromeInternalLogSource::Fetch(const SysLogsSourceCallback& callback) { | 44 void ChromeInternalLogSource::Fetch(const SysLogsSourceCallback& callback) { |
| 45 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 45 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 46 DCHECK(!callback.is_null()); | 46 DCHECK(!callback.is_null()); |
| 47 | 47 |
| 48 SystemLogsResponse response; | 48 SystemLogsResponse response; |
| 49 | 49 |
| 50 chrome::VersionInfo version_info; | 50 chrome::VersionInfo version_info; |
| 51 response[kChromeVersionTag] = version_info.CreateVersionString(); | 51 response[kChromeVersionTag] = version_info.CreateVersionString(); |
| 52 | 52 |
| 53 #if !defined(OS_CHROMEOS) | 53 #if !defined(OS_CHROMEOS) |
| 54 // On ChromeOS, this will be pulled in from the LSB_RELEASE. | 54 // On ChromeOS, this will be pulled in from the LSB_RELEASE. |
| 55 std::string os_version = base::SysInfo::OperatingSystemName() + ": " + | 55 std::string os_version = base::SysInfo::OperatingSystemName() + ": " + |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs(); | 135 PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs(); |
| 136 bool is_data_reduction_proxy_enabled = prefs->HasPrefPath( | 136 bool is_data_reduction_proxy_enabled = prefs->HasPrefPath( |
| 137 data_reduction_proxy::prefs::kDataReductionProxyEnabled) && | 137 data_reduction_proxy::prefs::kDataReductionProxyEnabled) && |
| 138 prefs->GetBoolean( | 138 prefs->GetBoolean( |
| 139 data_reduction_proxy::prefs::kDataReductionProxyEnabled); | 139 data_reduction_proxy::prefs::kDataReductionProxyEnabled); |
| 140 (*response)[kDataReductionProxyKey] = is_data_reduction_proxy_enabled ? | 140 (*response)[kDataReductionProxyKey] = is_data_reduction_proxy_enabled ? |
| 141 "enabled" : "disabled"; | 141 "enabled" : "disabled"; |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace system_logs | 144 } // namespace system_logs |
| OLD | NEW |