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

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

Issue 99473012: Enable icu_use_data_file on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: icudtl.dat listed in win/server.rules Created 7 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
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 data_path = data_path.AppendASCII(ICU_UTIL_DATA_FILE_NAME); 97 data_path = data_path.AppendASCII(ICU_UTIL_DATA_FILE_NAME);
98 #else 98 #else
99 FilePath data_path = 99 FilePath data_path =
100 base::mac::PathForFrameworkBundleResource(CFSTR(ICU_UTIL_DATA_FILE_NAME)); 100 base::mac::PathForFrameworkBundleResource(CFSTR(ICU_UTIL_DATA_FILE_NAME));
101 if (data_path.empty()) { 101 if (data_path.empty()) {
102 DLOG(ERROR) << ICU_UTIL_DATA_FILE_NAME << " not found in bundle"; 102 DLOG(ERROR) << ICU_UTIL_DATA_FILE_NAME << " not found in bundle";
103 return false; 103 return false;
104 } 104 }
105 #endif // OS check 105 #endif // OS check
106 if (!mapped_file.Initialize(data_path)) { 106 if (!mapped_file.Initialize(data_path)) {
107 DLOG(ERROR) << "Couldn't mmap " << data_path.value(); 107 DLOG(ERROR) << "Couldn't mmap " << data_path.AsUTF8Unsafe();
108 return false; 108 return false;
109 } 109 }
110 } 110 }
111 UErrorCode err = U_ZERO_ERROR; 111 UErrorCode err = U_ZERO_ERROR;
112 udata_setCommonData(const_cast<uint8*>(mapped_file.data()), &err); 112 udata_setCommonData(const_cast<uint8*>(mapped_file.data()), &err);
113 return err == U_ZERO_ERROR; 113 return err == U_ZERO_ERROR;
114 #endif 114 #endif
115 } 115 }
116 116
117 } // namespace i18n 117 } // namespace i18n
118 } // namespace base 118 } // namespace base
OLDNEW
« no previous file with comments | « base/base.gyp ('k') | build/common.gypi » ('j') | chrome/tools/build/win/server.rules » ('J')

Powered by Google App Engine
This is Rietveld 408576698