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

Side by Side Diff: base/mime_util_xdg.cc

Issue 8430019: Make LazyInstance managed Locks leaky. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « no previous file | chrome/browser/internal_auth.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/mime_util.h" 5 #include "base/mime_util.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 #include <sys/time.h> 8 #include <sys/time.h>
9 #include <time.h> 9 #include <time.h>
10 10
(...skipping 11 matching lines...) Expand all
22 #include "base/string_split.h" 22 #include "base/string_split.h"
23 #include "base/string_util.h" 23 #include "base/string_util.h"
24 #include "base/synchronization/lock.h" 24 #include "base/synchronization/lock.h"
25 #include "base/third_party/xdg_mime/xdgmime.h" 25 #include "base/third_party/xdg_mime/xdgmime.h"
26 #include "base/threading/thread_restrictions.h" 26 #include "base/threading/thread_restrictions.h"
27 27
28 namespace { 28 namespace {
29 29
30 // None of the XDG stuff is thread-safe, so serialize all access under 30 // None of the XDG stuff is thread-safe, so serialize all access under
31 // this lock. 31 // this lock.
32 static base::LazyInstance<base::Lock> 32 static base::LazyInstance<base::Lock,
33 g_mime_util_xdg_lock(base::LINKER_INITIALIZED); 33 base::LeakyLazyInstanceTraits<base::Lock> >
34 g_mime_util_xdg_lock(base::LINKER_INITIALIZED);
34 35
35 class IconTheme; 36 class IconTheme;
36 37
37 class MimeUtilConstants { 38 class MimeUtilConstants {
38 public: 39 public:
39 typedef std::map<std::string, IconTheme*> IconThemeMap; 40 typedef std::map<std::string, IconTheme*> IconThemeMap;
40 typedef std::map<FilePath, int> IconDirMtimeMap; 41 typedef std::map<FilePath, int> IconDirMtimeMap;
41 typedef std::vector<std::string> IconFormats; 42 typedef std::vector<std::string> IconFormats;
42 43
43 // In seconds, specified by icon theme specs. 44 // In seconds, specified by icon theme specs.
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 } else { 634 } else {
634 icon_file = LookupIconInDefaultTheme(icon_names[i], size); 635 icon_file = LookupIconInDefaultTheme(icon_names[i], size);
635 if (!icon_file.empty()) 636 if (!icon_file.empty())
636 return icon_file; 637 return icon_file;
637 } 638 }
638 } 639 }
639 return FilePath(); 640 return FilePath();
640 } 641 }
641 642
642 } // namespace mime_util 643 } // namespace mime_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/internal_auth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698