| Index: chrome/browser/resources/file_manager/js/file_manager.js
|
| diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
|
| index 2247353709a25c050fac7f54aeb6231bf1e41486..121a320a500b7d4e610c3f1ae345814129288072 100644
|
| --- a/chrome/browser/resources/file_manager/js/file_manager.js
|
| +++ b/chrome/browser/resources/file_manager/js/file_manager.js
|
| @@ -557,8 +557,13 @@ FileManager.prototype = {
|
|
|
| this.refocus();
|
|
|
| - this.localMetadataProvider_ = this.createLocalMetadataProvider_();
|
| - this.gdataMetadataProvider_ = new GDataMetadataProvider();
|
| + this.metadataProvider_ =
|
| + new MetadataProvider(this.filesystem_.root.toURL());
|
| +
|
| + // PyAuto tests monitor this state by polling this variable
|
| + this.__defineGetter__('workerInitialized_', function() {
|
| + return self.getMetadataProvider().isInitialized();
|
| + });
|
|
|
| this.table_.list.endBatchUpdates();
|
| this.grid_.endBatchUpdates();
|
| @@ -2191,47 +2196,13 @@ FileManager.prototype = {
|
| };
|
|
|
|
|
| - FileManager.prototype.createLocalMetadataProvider_ = function() {
|
| - // Subclass MetadataProvider to notify tests when the initialization
|
| - // is complete.
|
| -
|
| - var fileManager = this;
|
| -
|
| - function TestAwareMetadataProvider () {
|
| - MetadataProvider.apply(this, arguments);
|
| - }
|
| -
|
| - TestAwareMetadataProvider.prototype = {
|
| - __proto__: MetadataProvider.prototype,
|
| -
|
| - onInitialized_: function() {
|
| - MetadataProvider.prototype.onInitialized_.apply(this, arguments);
|
| -
|
| - // We're ready to run. Tests can monitor for this state with
|
| - // ExtensionTestMessageListener listener("worker-initialized");
|
| - // ASSERT_TRUE(listener.WaitUntilSatisfied());
|
| - // Automated tests need to wait for this, otherwise we crash in
|
| - // browser_test cleanup because the worker process still has
|
| - // URL requests in-flight.
|
| - chrome.test.sendMessage('worker-initialized');
|
| - // PyAuto tests monitor this state by polling this variable
|
| - fileManager.workerInitialized_ = true;
|
| - }
|
| - };
|
| -
|
| - return new TestAwareMetadataProvider();
|
| - };
|
| -
|
| FileManager.prototype.isOnGData = function() {
|
| return this.directoryModel_ &&
|
| this.directoryModel_.rootPath == '/' + DirectoryModel.GDATA_DIRECTORY;
|
| };
|
|
|
| FileManager.prototype.getMetadataProvider = function() {
|
| - if (this.isOnGData())
|
| - return this.gdataMetadataProvider_;
|
| - else
|
| - return this.localMetadataProvider_;
|
| + return this.metadataProvider_;
|
| };
|
|
|
| /**
|
|
|