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

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

Issue 9117038: Convert all remaining explicit LeakyLazyInstanceTraits users to ::Leaky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ProfileManager* profile_manager = g_browser_process->profile_manager(); 59 ProfileManager* profile_manager = g_browser_process->profile_manager();
60 std::vector<Profile*> profiles = profile_manager->GetLoadedProfiles(); 60 std::vector<Profile*> profiles = profile_manager->GetLoadedProfiles();
61 if (profiles.empty()) 61 if (profiles.empty())
62 return NULL; 62 return NULL;
63 63
64 return PluginPrefs::GetForProfile(profiles.front()); 64 return PluginPrefs::GetForProfile(profiles.front());
65 } 65 }
66 66
67 } // namespace 67 } // namespace
68 68
69 static base::LazyInstance<std::string, 69 static base::LazyInstance<std::string>::Leaky
70 base::LeakyLazyInstanceTraits<std::string > >
71 g_version_extension = LAZY_INSTANCE_INITIALIZER; 70 g_version_extension = LAZY_INSTANCE_INITIALIZER;
72 71
73 MetricsLog::MetricsLog(const std::string& client_id, int session_id) 72 MetricsLog::MetricsLog(const std::string& client_id, int session_id)
74 : MetricsLogBase(client_id, session_id, MetricsLog::GetVersionString()) {} 73 : MetricsLogBase(client_id, session_id, MetricsLog::GetVersionString()) {}
75 74
76 MetricsLog::~MetricsLog() {} 75 MetricsLog::~MetricsLog() {}
77 76
78 // static 77 // static
79 void MetricsLog::RegisterPrefs(PrefService* local_state) { 78 void MetricsLog::RegisterPrefs(PrefService* local_state) {
80 local_state->RegisterListPref(prefs::kStabilityPluginStats); 79 local_state->RegisterListPref(prefs::kStabilityPluginStats);
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); 523 const std::string result_type(AutocompleteMatch::TypeToString(i->type));
525 if (!result_type.empty()) 524 if (!result_type.empty())
526 WriteAttribute("resulttype", result_type); 525 WriteAttribute("resulttype", result_type);
527 WriteIntAttribute("relevance", i->relevance); 526 WriteIntAttribute("relevance", i->relevance);
528 WriteIntAttribute("isstarred", i->starred ? 1 : 0); 527 WriteIntAttribute("isstarred", i->starred ? 1 : 0);
529 } 528 }
530 } 529 }
531 530
532 ++num_events_; 531 ++num_events_;
533 } 532 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698