| 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 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 | 8 |
| 9 #include "app/gfx/font.h" | 9 #include "app/gfx/font.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| 11 #include "base/base_paths.h" | 11 #include "base/base_paths.h" |
| 12 #include "base/data_pack.h" | 12 #include "base/data_pack.h" |
| 13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
| 14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/mac_util.h" | 16 #include "base/mac_util.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "base/string_piece.h" | 18 #include "base/string_piece.h" |
| 19 #include "base/string_util.h" | 19 #include "base/string_util.h" |
| 20 #include "chrome/common/chrome_paths.h" | |
| 21 | 20 |
| 22 ResourceBundle::~ResourceBundle() { | 21 ResourceBundle::~ResourceBundle() { |
| 23 FreeImages(); | 22 FreeImages(); |
| 24 | 23 |
| 25 delete locale_resources_data_; | 24 delete locale_resources_data_; |
| 26 locale_resources_data_ = NULL; | 25 locale_resources_data_ = NULL; |
| 27 delete theme_data_; | 26 delete theme_data_; |
| 28 theme_data_ = NULL; | 27 theme_data_ = NULL; |
| 29 delete resources_data_; | 28 delete resources_data_; |
| 30 resources_data_ = NULL; | 29 resources_data_ = NULL; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 NOTREACHED() << "unable to find resource: " << message_id; | 109 NOTREACHED() << "unable to find resource: " << message_id; |
| 111 return string16(); | 110 return string16(); |
| 112 } | 111 } |
| 113 } | 112 } |
| 114 | 113 |
| 115 // Data pack encodes strings as UTF16. | 114 // Data pack encodes strings as UTF16. |
| 116 string16 msg(reinterpret_cast<const char16*>(data.data()), | 115 string16 msg(reinterpret_cast<const char16*>(data.data()), |
| 117 data.length() / 2); | 116 data.length() / 2); |
| 118 return msg; | 117 return msg; |
| 119 } | 118 } |
| OLD | NEW |