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

Side by Side Diff: base/i18n/icu_util.cc

Issue 139403006: Revert of Enable icu_use_data_file on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « base/base.gyp ('k') | build/common.gypi » ('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 "base/i18n/icu_util.h" 5 #include "base/i18n/icu_util.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #else 100 #else
101 // Assume it is in the framework bundle's Resources directory. 101 // Assume it is in the framework bundle's Resources directory.
102 FilePath data_path = 102 FilePath data_path =
103 base::mac::PathForFrameworkBundleResource(CFSTR(ICU_UTIL_DATA_FILE_NAME)); 103 base::mac::PathForFrameworkBundleResource(CFSTR(ICU_UTIL_DATA_FILE_NAME));
104 if (data_path.empty()) { 104 if (data_path.empty()) {
105 DLOG(ERROR) << ICU_UTIL_DATA_FILE_NAME << " not found in bundle"; 105 DLOG(ERROR) << ICU_UTIL_DATA_FILE_NAME << " not found in bundle";
106 return false; 106 return false;
107 } 107 }
108 #endif // OS check 108 #endif // OS check
109 if (!mapped_file.Initialize(data_path)) { 109 if (!mapped_file.Initialize(data_path)) {
110 DLOG(ERROR) << "Couldn't mmap " << data_path.AsUTF8Unsafe(); 110 DLOG(ERROR) << "Couldn't mmap " << data_path.value();
111 return false; 111 return false;
112 } 112 }
113 } 113 }
114 UErrorCode err = U_ZERO_ERROR; 114 UErrorCode err = U_ZERO_ERROR;
115 udata_setCommonData(const_cast<uint8*>(mapped_file.data()), &err); 115 udata_setCommonData(const_cast<uint8*>(mapped_file.data()), &err);
116 return err == U_ZERO_ERROR; 116 return err == U_ZERO_ERROR;
117 #endif 117 #endif
118 } 118 }
119 119
120 } // namespace i18n 120 } // namespace i18n
121 } // namespace base 121 } // namespace base
OLDNEW
« no previous file with comments | « base/base.gyp ('k') | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698