Commit de500dad authored by oleg@chromium.org's avatar oleg@chromium.org

Remove remaining uses of v8Locale. Fix the call to v8Intl.DateTimeFormat().

Review URL: https://chromiumcodereview.appspot.com/10332311

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138493 0039d316-1c4b-4281-b951-d872f2087c98
parent f8ea9316
...@@ -44,9 +44,6 @@ function FileManager(dialogDom) { ...@@ -44,9 +44,6 @@ function FileManager(dialogDom) {
FileManager.DialogType.SELECT_OPEN_MULTI_FILE, FileManager.DialogType.SELECT_OPEN_MULTI_FILE,
FileManager.DialogType.FULL_PAGE]); FileManager.DialogType.FULL_PAGE]);
// TODO(dgozman): This will be changed to LocaleInfo.
this.locale_ = new v8Locale(navigator.language);
this.initFileSystem_(); this.initFileSystem_();
this.volumeManager_ = VolumeManager.getInstance(); this.volumeManager_ = VolumeManager.getInstance();
this.initDom_(); this.initDom_();
...@@ -451,15 +448,14 @@ FileManager.prototype = { ...@@ -451,15 +448,14 @@ FileManager.prototype = {
}.bind(this)); }.bind(this));
this.dateFormatter_ = v8Intl.DateTimeFormat( this.dateFormatter_ = v8Intl.DateTimeFormat(
{} /* default locale */, [] /* default locale */,
{year: 'numeric', month: 'short', day: 'numeric', {year: 'numeric', month: 'short', day: 'numeric',
hour: 'numeric', minute: 'numeric'}); hour: 'numeric', minute: 'numeric'});
this.timeFormatter_ = v8Intl.DateTimeFormat( this.timeFormatter_ = v8Intl.DateTimeFormat(
{} /* default locale */, [] /* default locale */,
{hour: 'numeric', minute: 'numeric'}); {hour: 'numeric', minute: 'numeric'});
this.collator_ = this.locale_.createCollator({ this.collator_ = v8Intl.Collator([], {numeric: true, sensitivity: 'base'});
'numeric': true, 'ignoreCase': true, 'ignoreAccents': true});
// Optional list of file types. // Optional list of file types.
this.fileTypes_ = this.params_.typeList; this.fileTypes_ = this.params_.typeList;
......
...@@ -750,5 +750,20 @@ v8Intl.DateTimeFormat = function(locales, options) { ...@@ -750,5 +750,20 @@ v8Intl.DateTimeFormat = function(locales, options) {
}; };
}; };
/**
* @constructor
* @param {Array?} locales Unused in the mock.
* @param {Object} options Unused in the mock.
*/
v8Intl.Collator = function(locales, options) {
return {
compare: function(a, b) {
if (a > b) return 1;
if (a < b) return -1;
return 0;
}
};
};
return v8Intl; return v8Intl;
}()); }());
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment