Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Side by Side Diff: chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc

Issue 1128173005: Clean up ProfileManager interface. Base URL: https://chromium.googlesource.com/chromium/src@issue479309
Patch Set: sync Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() + ": " +
56 base::SysInfo::OperatingSystemVersion(); 56 base::SysInfo::OperatingSystemVersion();
57 response[kOsVersionTag] = os_version; 57 response[kOsVersionTag] = os_version;
58 #endif 58 #endif
59 59
60 PopulateSyncLogs(&response); 60 PopulateSyncLogs(&response);
61 PopulateExtensionInfoLogs(&response); 61 PopulateExtensionInfoLogs(&response);
62 PopulateDataReductionProxyLogs(&response); 62 PopulateDataReductionProxyLogs(&response);
63 63
64 if (ProfileManager::GetLastUsedProfile()->IsChild()) 64 if (g_browser_process->profile_manager()->GetLastUsedProfile()->IsChild())
65 response["account_type"] = "child"; 65 response["account_type"] = "child";
66 66
67 callback.Run(&response); 67 callback.Run(&response);
68 } 68 }
69 69
70 void ChromeInternalLogSource::PopulateSyncLogs(SystemLogsResponse* response) { 70 void ChromeInternalLogSource::PopulateSyncLogs(SystemLogsResponse* response) {
71 // We are only interested in sync logs for the primary user profile. 71 // We are only interested in sync logs for the primary user profile.
72 Profile* profile = ProfileManager::GetPrimaryUserProfile(); 72 Profile* profile = ProfileManager::GetPrimaryUserProfile();
73 if (!profile || 73 if (!profile ||
74 !ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService(profile)) 74 !ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService(profile))
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs(); 138 PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs();
139 bool is_data_reduction_proxy_enabled = prefs->HasPrefPath( 139 bool is_data_reduction_proxy_enabled = prefs->HasPrefPath(
140 data_reduction_proxy::prefs::kDataReductionProxyEnabled) && 140 data_reduction_proxy::prefs::kDataReductionProxyEnabled) &&
141 prefs->GetBoolean( 141 prefs->GetBoolean(
142 data_reduction_proxy::prefs::kDataReductionProxyEnabled); 142 data_reduction_proxy::prefs::kDataReductionProxyEnabled);
143 (*response)[kDataReductionProxyKey] = is_data_reduction_proxy_enabled ? 143 (*response)[kDataReductionProxyKey] = is_data_reduction_proxy_enabled ?
144 "enabled" : "disabled"; 144 "enabled" : "disabled";
145 } 145 }
146 146
147 } // namespace system_logs 147 } // namespace system_logs
OLDNEW
« no previous file with comments | « chrome/browser/feedback/show_feedback_page.cc ('k') | chrome/browser/history/android/android_provider_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698