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

Side by Side Diff: ui/base/ui_base_paths.cc

Issue 10024050: Metro/HiDPI: Move 1x icons into separate pak file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 | « ui/base/ui_base_paths.h ('k') | ui/test/test_suite.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 "ui/base/ui_base_paths.h" 5 #include "ui/base/ui_base_paths.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 #if defined(OS_MACOSX) 25 #if defined(OS_MACOSX)
26 // On Mac, locale files are in Contents/Resources, a sibling of the 26 // On Mac, locale files are in Contents/Resources, a sibling of the
27 // App dir. 27 // App dir.
28 cur = cur.DirName(); 28 cur = cur.DirName();
29 cur = cur.Append(FILE_PATH_LITERAL("Resources")); 29 cur = cur.Append(FILE_PATH_LITERAL("Resources"));
30 #else 30 #else
31 cur = cur.Append(FILE_PATH_LITERAL("locales")); 31 cur = cur.Append(FILE_PATH_LITERAL("locales"));
32 #endif 32 #endif
33 create_dir = true; 33 create_dir = true;
34 break; 34 break;
35 case ui::FILE_RESOURCES_PAK:
36 #if defined(OS_POSIX) && !defined(OS_MACOSX)
37 if (!PathService::Get(base::DIR_EXE, &cur))
38 return false;
39 // TODO(tony): We shouldn't be referencing chrome here.
40 cur = cur.AppendASCII("chrome.pak");
41 #else
42 NOTREACHED();
43 #endif
44 break;
45 // The following are only valid in the development environment, and 35 // The following are only valid in the development environment, and
46 // will fail if executed from an installed executable (because the 36 // will fail if executed from an installed executable (because the
47 // generated path won't exist). 37 // generated path won't exist).
48 case ui::DIR_TEST_DATA: 38 case ui::DIR_TEST_DATA:
49 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) 39 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
50 return false; 40 return false;
51 cur = cur.Append(FILE_PATH_LITERAL("app")); 41 cur = cur.Append(FILE_PATH_LITERAL("app"));
52 cur = cur.Append(FILE_PATH_LITERAL("test")); 42 cur = cur.Append(FILE_PATH_LITERAL("test"));
53 cur = cur.Append(FILE_PATH_LITERAL("data")); 43 cur = cur.Append(FILE_PATH_LITERAL("data"));
54 if (!file_util::PathExists(cur)) // we don't want to create this 44 if (!file_util::PathExists(cur)) // we don't want to create this
(...skipping 11 matching lines...) Expand all
66 return true; 56 return true;
67 } 57 }
68 58
69 // This cannot be done as a static initializer sadly since Visual Studio will 59 // This cannot be done as a static initializer sadly since Visual Studio will
70 // eliminate this object file if there is no direct entry point into it. 60 // eliminate this object file if there is no direct entry point into it.
71 void RegisterPathProvider() { 61 void RegisterPathProvider() {
72 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 62 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
73 } 63 }
74 64
75 } // namespace ui 65 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ui_base_paths.h ('k') | ui/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698