OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "app/resource_bundle.h" | 5 #include "app/resource_bundle.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 | 8 |
| 9 #include "app/l10n_util.h" |
9 #include "base/file_util.h" | 10 #include "base/file_util.h" |
10 #include "base/logging.h" | 11 #include "base/logging.h" |
11 #include "base/path_service.h" | 12 #include "base/path_service.h" |
12 #include "base/resource_util.h" | 13 #include "base/resource_util.h" |
13 #include "base/string_piece.h" | 14 #include "base/string_piece.h" |
14 #include "base/win_util.h" | 15 #include "base/win_util.h" |
15 #include "chrome/common/chrome_paths.h" | 16 #include "chrome/common/chrome_paths.h" |
16 #include "chrome/common/gfx/chrome_font.h" | 17 #include "chrome/common/gfx/chrome_font.h" |
17 #include "chrome/common/l10n_util.h" | |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // Returns the flags that should be passed to LoadLibraryEx. | 21 // Returns the flags that should be passed to LoadLibraryEx. |
22 DWORD GetDataDllLoadFlags() { | 22 DWORD GetDataDllLoadFlags() { |
23 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) | 23 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) |
24 return LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE | LOAD_LIBRARY_AS_IMAGE_RESOURCE; | 24 return LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE | LOAD_LIBRARY_AS_IMAGE_RESOURCE; |
25 | 25 |
26 return DONT_RESOLVE_DLL_REFERENCES; | 26 return DONT_RESOLVE_DLL_REFERENCES; |
27 } | 27 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 image = AtlGetStringResourceImage(_AtlBaseModule.GetModuleInstance(), | 149 image = AtlGetStringResourceImage(_AtlBaseModule.GetModuleInstance(), |
150 message_id); | 150 message_id); |
151 if (!image) { | 151 if (!image) { |
152 NOTREACHED() << "unable to find resource: " << message_id; | 152 NOTREACHED() << "unable to find resource: " << message_id; |
153 return std::wstring(); | 153 return std::wstring(); |
154 } | 154 } |
155 } | 155 } |
156 // Copy into a string16 and return. | 156 // Copy into a string16 and return. |
157 return string16(image->achString, image->nLength); | 157 return string16(image->achString, image->nLength); |
158 } | 158 } |
OLD | NEW |