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

Side by Side Diff: extensions/browser/guest_view/guest_view_events.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "extensions/browser/guest_view/guest_view_events.h" 5 #include "extensions/browser/guest_view/guest_view_events.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 auto value = values_.find(event_name); 91 auto value = values_.find(event_name);
92 return value != values_.end() ? value->second : events::UNKNOWN; 92 return value != values_.end() ? value->second : events::UNKNOWN;
93 } 93 }
94 94
95 private: 95 private:
96 std::map<std::string, events::HistogramValue> values_; 96 std::map<std::string, events::HistogramValue> values_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(EventMap); 98 DISALLOW_COPY_AND_ASSIGN(EventMap);
99 }; 99 };
100 100
101 base::LazyInstance<EventMap> g_event_map = LAZY_INSTANCE_INITIALIZER; 101 base::LazyInstance<EventMap>::DestructorAtExit g_event_map =
102 LAZY_INSTANCE_INITIALIZER;
102 103
103 } // namespace 104 } // namespace
104 105
105 events::HistogramValue GetEventHistogramValue(const std::string& event_name) { 106 events::HistogramValue GetEventHistogramValue(const std::string& event_name) {
106 return g_event_map.Get().Get(event_name); 107 return g_event_map.Get().Get(event_name);
107 } 108 }
108 109
109 } // namespace guest_view_events 110 } // namespace guest_view_events
110 } // namespace extensions 111 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/app_view/app_view_guest.cc ('k') | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698