OLD | NEW |
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 "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> |
11 | 11 |
12 #include "base/environment.h" | 12 #include "base/environment.h" |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/memory/singleton.h" | 17 #include "base/memory/singleton.h" |
18 #include "base/nix/xdg_util.h" | 18 #include "base/nix/xdg_util.h" |
19 #include "base/strings/string_split.h" | 19 #include "base/strings/string_split.h" |
20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
21 #include "base/synchronization/lock.h" | 21 #include "base/synchronization/lock.h" |
22 #include "base/third_party/xdg_mime/xdgmime.h" | 22 #include "base/third_party/xdg_mime/xdgmime.h" |
23 #include "base/threading/thread_restrictions.h" | 23 #include "base/threading/thread_restrictions.h" |
24 #include "base/time.h" | 24 #include "base/time/time.h" |
25 | 25 |
26 namespace base { | 26 namespace base { |
27 namespace nix { | 27 namespace nix { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 class IconTheme; | 31 class IconTheme; |
32 | 32 |
33 // None of the XDG stuff is thread-safe, so serialize all access under | 33 // None of the XDG stuff is thread-safe, so serialize all access under |
34 // this lock. | 34 // this lock. |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 icon_file = LookupIconInDefaultTheme(icon_names[i], size); | 646 icon_file = LookupIconInDefaultTheme(icon_names[i], size); |
647 if (!icon_file.empty()) | 647 if (!icon_file.empty()) |
648 return icon_file; | 648 return icon_file; |
649 } | 649 } |
650 } | 650 } |
651 return FilePath(); | 651 return FilePath(); |
652 } | 652 } |
653 | 653 |
654 } // namespace nix | 654 } // namespace nix |
655 } // namespace base | 655 } // namespace base |
OLD | NEW |