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

Unified Diff: chrome/browser/resources/file_manager/js/metadata_provider.js

Issue 8538009: Cleaning up and updating mock_chrome.js (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/mock_chrome.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/metadata_provider.js
diff --git a/chrome/browser/resources/file_manager/js/metadata_provider.js b/chrome/browser/resources/file_manager/js/metadata_provider.js
index ecddd767a7a60aec2c05cd13d95836806f8c3fd2..d225b34435f8238d5ff7f54c8cb32baa612ab4fd 100644
--- a/chrome/browser/resources/file_manager/js/metadata_provider.js
+++ b/chrome/browser/resources/file_manager/js/metadata_provider.js
@@ -11,8 +11,13 @@ function MetadataProvider(opt_workerPath) {
// Pass all URLs to the metadata reader until we have a correct filter.
this.urlFilter = /.*/;
- this.dispatcher_ = new Worker(opt_workerPath ||
- document.location.origin + '/js/metadata_dispatcher.js');
+ if (!opt_workerPath) {
+ var path = document.location.pathname;
+ opt_workerPath = path.substring(0, path.lastIndexOf('/') + 1) +
+ 'js/metadata_dispatcher.js';
+ }
+
+ this.dispatcher_ = new Worker(opt_workerPath);
this.dispatcher_.onmessage = this.onMessage_.bind(this);
this.dispatcher_.postMessage({verb: 'init'});
// Initialization is not complete until the Worker sends back the
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/mock_chrome.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698