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: base/nix/mime_util_xdg.cc

Issue 9192024: Add a convenience typedef LazyInstance<T>::Leaky to avoid repeating T. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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
« no previous file with comments | « base/lazy_instance_unittest.cc ('k') | base/threading/watchdog.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/nix/mime_util_xdg.h" 5 #include "base/nix/mime_util_xdg.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 15 matching lines...) Expand all
26 #if defined(TOOLKIT_USES_GTK) 26 #if defined(TOOLKIT_USES_GTK)
27 #include <gtk/gtk.h> // NOLINT 27 #include <gtk/gtk.h> // NOLINT
28 28
29 #include "base/message_loop.h" 29 #include "base/message_loop.h"
30 #endif 30 #endif
31 31
32 namespace { 32 namespace {
33 33
34 // None of the XDG stuff is thread-safe, so serialize all access under 34 // None of the XDG stuff is thread-safe, so serialize all access under
35 // this lock. 35 // this lock.
36 static base::LazyInstance<base::Lock, 36 static base::LazyInstance<base::Lock>::Leaky
37 base::LeakyLazyInstanceTraits<base::Lock> >
38 g_mime_util_xdg_lock = LAZY_INSTANCE_INITIALIZER; 37 g_mime_util_xdg_lock = LAZY_INSTANCE_INITIALIZER;
39 38
40 class IconTheme; 39 class IconTheme;
41 40
42 class MimeUtilConstants { 41 class MimeUtilConstants {
43 public: 42 public:
44 typedef std::map<std::string, IconTheme*> IconThemeMap; 43 typedef std::map<std::string, IconTheme*> IconThemeMap;
45 typedef std::map<FilePath, base::Time> IconDirMtimeMap; 44 typedef std::map<FilePath, base::Time> IconDirMtimeMap;
46 typedef std::vector<std::string> IconFormats; 45 typedef std::vector<std::string> IconFormats;
47 46
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 icon_file = LookupIconInDefaultTheme(icon_names[i], size); 667 icon_file = LookupIconInDefaultTheme(icon_names[i], size);
669 if (!icon_file.empty()) 668 if (!icon_file.empty())
670 return icon_file; 669 return icon_file;
671 } 670 }
672 } 671 }
673 return FilePath(); 672 return FilePath();
674 } 673 }
675 674
676 } // namespace nix 675 } // namespace nix
677 } // namespace base 676 } // namespace base
OLDNEW
« no previous file with comments | « base/lazy_instance_unittest.cc ('k') | base/threading/watchdog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698