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

Side by Side Diff: chrome/browser/resources_util.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 (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/resources_util.h" 5 #include "chrome/browser/resources_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 StringIntMap::const_iterator it = id_map_.find(resource_name); 47 StringIntMap::const_iterator it = id_map_.find(resource_name);
48 if (it == id_map_.end()) 48 if (it == id_map_.end())
49 return -1; 49 return -1;
50 return it->second; 50 return it->second;
51 } 51 }
52 52
53 private: 53 private:
54 StringIntMap id_map_; 54 StringIntMap id_map_;
55 }; 55 };
56 56
57 static base::LazyInstance<ThemeMap> g_theme_ids = LAZY_INSTANCE_INITIALIZER; 57 static base::LazyInstance<ThemeMap>::DestructorAtExit g_theme_ids =
58 LAZY_INSTANCE_INITIALIZER;
58 59
59 } // namespace 60 } // namespace
60 61
61 int ResourcesUtil::GetThemeResourceId(const std::string& resource_name) { 62 int ResourcesUtil::GetThemeResourceId(const std::string& resource_name) {
62 return g_theme_ids.Get().GetId(resource_name); 63 return g_theme_ids.Get().GetId(resource_name);
63 } 64 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698