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

Side by Side Diff: ui/base/resource/resource_bundle.cc

Issue 12286020: Replace FilePath with base::FilePath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/resource/resource_bundle.h ('k') | ui/base/resource/resource_bundle_aurax11.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) 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 "ui/base/resource/resource_bundle.h" 5 #include "ui/base/resource/resource_bundle.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 new DataPack(scale_factor)); 200 new DataPack(scale_factor));
201 if (data_pack->LoadFromFile(file)) { 201 if (data_pack->LoadFromFile(file)) {
202 AddDataPack(data_pack.release()); 202 AddDataPack(data_pack.release());
203 } else { 203 } else {
204 LOG(ERROR) << "Failed to load data pack from file." 204 LOG(ERROR) << "Failed to load data pack from file."
205 << "\nSome features may not be available."; 205 << "\nSome features may not be available.";
206 } 206 }
207 } 207 }
208 208
209 #if !defined(OS_MACOSX) 209 #if !defined(OS_MACOSX)
210 FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale, 210 base::FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale,
211 bool test_file_exists) { 211 bool test_file_exists) {
212 if (app_locale.empty()) 212 if (app_locale.empty())
213 return base::FilePath(); 213 return base::FilePath();
214 214
215 base::FilePath locale_file_path; 215 base::FilePath locale_file_path;
216 216
217 PathService::Get(ui::DIR_LOCALES, &locale_file_path); 217 PathService::Get(ui::DIR_LOCALES, &locale_file_path);
218 218
219 if (!locale_file_path.empty()) 219 if (!locale_file_path.empty())
220 locale_file_path = locale_file_path.AppendASCII(app_locale + ".pak"); 220 locale_file_path = locale_file_path.AppendASCII(app_locale + ".pak");
221 221
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 // static 710 // static
711 bool ResourceBundle::DecodePNG(const unsigned char* buf, 711 bool ResourceBundle::DecodePNG(const unsigned char* buf,
712 size_t size, 712 size_t size,
713 SkBitmap* bitmap, 713 SkBitmap* bitmap,
714 bool* fell_back_to_1x) { 714 bool* fell_back_to_1x) {
715 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size); 715 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size);
716 return gfx::PNGCodec::Decode(buf, size, bitmap); 716 return gfx::PNGCodec::Decode(buf, size, bitmap);
717 } 717 }
718 718
719 } // namespace ui 719 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle.h ('k') | ui/base/resource/resource_bundle_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698