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

Side by Side Diff: chrome/browser/resources/file_manager/js/metadata_provider.js

Issue 8585027: Moving checkboxes to a separate column. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review fix 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 /** 5 /**
6 * @param {string} opt_workerPath path to the worker source JS file. 6 * @param {string} opt_workerPath path to the worker source JS file.
7 */ 7 */
8 function MetadataProvider(opt_workerPath) { 8 function MetadataProvider(opt_workerPath) {
9 this.cache_ = {}; 9 this.cache_ = {};
10 10
11 // Pass all URLs to the metadata reader until we have a correct filter. 11 // Pass all URLs to the metadata reader until we have a correct filter.
12 this.urlFilter = /.*/; 12 this.urlFilter = /.*/;
13 13
14 if (!opt_workerPath) { 14 if (!opt_workerPath) {
15 var path = document.location.pathname; 15 var path = document.location.pathname;
16 opt_workerPath = path.substring(0, path.lastIndexOf('/') + 1) + 16 opt_workerPath = document.location.origin +
17 path.substring(0, path.lastIndexOf('/') + 1) +
17 'js/metadata_dispatcher.js'; 18 'js/metadata_dispatcher.js';
18 } 19 }
19 20
20 this.dispatcher_ = new Worker(opt_workerPath); 21 this.dispatcher_ = new Worker(opt_workerPath);
21 this.dispatcher_.onmessage = this.onMessage_.bind(this); 22 this.dispatcher_.onmessage = this.onMessage_.bind(this);
22 this.dispatcher_.postMessage({verb: 'init'}); 23 this.dispatcher_.postMessage({verb: 'init'});
23 // Initialization is not complete until the Worker sends back the 24 // Initialization is not complete until the Worker sends back the
24 // 'initialized' message. See below. 25 // 'initialized' message. See below.
25 } 26 }
26 27
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 }; 106 };
106 107
107 MetadataProvider.prototype.onError_ = function(url, step, error, metadata) { 108 MetadataProvider.prototype.onError_ = function(url, step, error, metadata) {
108 console.warn('metadata: ' + url + ': ' + step + ': ' + error); 109 console.warn('metadata: ' + url + ': ' + step + ': ' + error);
109 this.onResult_(url, metadata || {}); 110 this.onResult_(url, metadata || {});
110 }; 111 };
111 112
112 MetadataProvider.prototype.onLog_ = function(arglist) { 113 MetadataProvider.prototype.onLog_ = function(arglist) {
113 console.log.apply(console, ['metadata:'].concat(arglist)); 114 console.log.apply(console, ['metadata:'].concat(arglist));
114 }; 115 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | chrome/browser/resources/file_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698