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

Side by Side Diff: chrome/browser/metrics/metrics_log.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/memory_purger.cc ('k') | chrome/browser/nacl_host/nacl_browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/metrics/metrics_log.h" 5 #include "chrome/browser/metrics/metrics_log.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 if (!profile_manager) { 186 if (!profile_manager) {
187 // The profile manager can be NULL when testing. 187 // The profile manager can be NULL when testing.
188 return NULL; 188 return NULL;
189 } 189 }
190 190
191 std::vector<Profile*> profiles = profile_manager->GetLoadedProfiles(); 191 std::vector<Profile*> profiles = profile_manager->GetLoadedProfiles();
192 if (profiles.empty()) 192 if (profiles.empty())
193 return NULL; 193 return NULL;
194 194
195 return PluginPrefs::GetForProfile(profiles.front()); 195 return PluginPrefs::GetForProfile(profiles.front()).get();
196 } 196 }
197 197
198 // Fills |plugin| with the info contained in |plugin_info| and |plugin_prefs|. 198 // Fills |plugin| with the info contained in |plugin_info| and |plugin_prefs|.
199 void SetPluginInfo(const webkit::WebPluginInfo& plugin_info, 199 void SetPluginInfo(const webkit::WebPluginInfo& plugin_info,
200 const PluginPrefs* plugin_prefs, 200 const PluginPrefs* plugin_prefs,
201 SystemProfileProto::Plugin* plugin) { 201 SystemProfileProto::Plugin* plugin) {
202 plugin->set_name(UTF16ToUTF8(plugin_info.name)); 202 plugin->set_name(UTF16ToUTF8(plugin_info.name));
203 plugin->set_filename(plugin_info.path.BaseName().AsUTF8Unsafe()); 203 plugin->set_filename(plugin_info.path.BaseName().AsUTF8Unsafe());
204 plugin->set_version(UTF16ToUTF8(plugin_info.version)); 204 plugin->set_version(UTF16ToUTF8(plugin_info.version));
205 if (plugin_prefs) 205 if (plugin_prefs)
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 1179
1180 paired_device->set_vendor_prefix(vendor_prefix); 1180 paired_device->set_vendor_prefix(vendor_prefix);
1181 } 1181 }
1182 1182
1183 paired_device->set_vendor_id(device->GetVendorID()); 1183 paired_device->set_vendor_id(device->GetVendorID());
1184 paired_device->set_product_id(device->GetProductID()); 1184 paired_device->set_product_id(device->GetProductID());
1185 paired_device->set_device_id(device->GetDeviceID()); 1185 paired_device->set_device_id(device->GetDeviceID());
1186 } 1186 }
1187 #endif // defined(OS_CHROMEOS) 1187 #endif // defined(OS_CHROMEOS)
1188 } 1188 }
OLDNEW
« no previous file with comments | « chrome/browser/memory_purger.cc ('k') | chrome/browser/nacl_host/nacl_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698