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

Side by Side Diff: app/resource_bundle_posix.cc

Issue 5992006: Move data pack from base to app (it's just part of the resource bundle system... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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 | « app/resource_bundle.cc ('k') | app/resource_bundle_win.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/data_pack.h"
7 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
8 #include "base/data_pack.h"
9 #include "base/lock.h" 9 #include "base/lock.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/stl_util-inl.h" 11 #include "base/stl_util-inl.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "base/string_piece.h" 13 #include "base/string_piece.h"
14 #include "gfx/font.h" 14 #include "gfx/font.h"
15 15
16 namespace { 16 namespace {
17 17
18 base::DataPack* LoadResourcesDataPak(FilePath resources_pak_path) { 18 app::DataPack* LoadResourcesDataPak(FilePath resources_pak_path) {
19 base::DataPack* resources_pak = new base::DataPack; 19 app::DataPack* resources_pak = new app::DataPack;
20 bool success = resources_pak->Load(resources_pak_path); 20 bool success = resources_pak->Load(resources_pak_path);
21 if (!success) { 21 if (!success) {
22 delete resources_pak; 22 delete resources_pak;
23 resources_pak = NULL; 23 resources_pak = NULL;
24 } 24 }
25 return resources_pak; 25 return resources_pak;
26 } 26 }
27 27
28 } // namespace 28 } // namespace
29 29
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 FilePath locale_file_path = GetLocaleFilePath(app_locale); 108 FilePath locale_file_path = GetLocaleFilePath(app_locale);
109 if (locale_file_path.empty()) { 109 if (locale_file_path.empty()) {
110 // It's possible that there is no locale.pak. 110 // It's possible that there is no locale.pak.
111 NOTREACHED(); 111 NOTREACHED();
112 return std::string(); 112 return std::string();
113 } 113 }
114 locale_resources_data_ = LoadResourcesDataPak(locale_file_path); 114 locale_resources_data_ = LoadResourcesDataPak(locale_file_path);
115 CHECK(locale_resources_data_) << "failed to load locale.pak"; 115 CHECK(locale_resources_data_) << "failed to load locale.pak";
116 return app_locale; 116 return app_locale;
117 } 117 }
OLDNEW
« no previous file with comments | « app/resource_bundle.cc ('k') | app/resource_bundle_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698