Commit 05404e5b authored by haruki@chromium.org's avatar haruki@chromium.org

filemanager: Remove garbage values and params for SharedWithMe server-side search.

BUG=
TEST=unittests, Open Files App and verify a search for Drive works.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194912 0039d316-1c4b-4281-b951-d872f2087c98
parent 6bb7a579
...@@ -434,17 +434,6 @@ DirectoryContentsBasic.prototype.createDirectory = function( ...@@ -434,17 +434,6 @@ DirectoryContentsBasic.prototype.createDirectory = function(
onSuccess.bind(this), errorCallback); onSuccess.bind(this), errorCallback);
}; };
/**
* List of search types for DirectoryContentsDriveSearch.
* SEARCH_FULL uses the full feed to search from everything.
* SEARCH_SHARED_WITH_ME uses the shared-with-me feed.
* @enum {number}
*/
DirectoryContentsDriveSearch.SearchType = {
SEARCH_FULL: 0,
SEARCH_SHARED_WITH_ME: 1
};
/** /**
* Delay to be used for drive search scan. * Delay to be used for drive search scan.
* The goal is to reduce the number of server requests when user is typing the * The goal is to reduce the number of server requests when user is typing the
...@@ -469,20 +458,17 @@ DirectoryContentsDriveSearch.MAX_RESULTS = 100; ...@@ -469,20 +458,17 @@ DirectoryContentsDriveSearch.MAX_RESULTS = 100;
* @param {DirectoryEntry} previousDirEntry DirectoryEntry that was current * @param {DirectoryEntry} previousDirEntry DirectoryEntry that was current
* before the search. * before the search.
* @param {string} query Search query. * @param {string} query Search query.
* @param {DirectoryContentsDriveSearch.SearchType} type Type of search.
* @constructor * @constructor
* @extends {DirectoryContents} * @extends {DirectoryContents}
*/ */
function DirectoryContentsDriveSearch(context, function DirectoryContentsDriveSearch(context,
dirEntry, dirEntry,
previousDirEntry, previousDirEntry,
query, query) {
type) {
DirectoryContents.call(this, context); DirectoryContents.call(this, context);
this.query_ = query;
this.type_ = type;
this.directoryEntry_ = dirEntry; this.directoryEntry_ = dirEntry;
this.previousDirectoryEntry_ = previousDirEntry; this.previousDirectoryEntry_ = previousDirEntry;
this.query_ = query;
this.nextFeed_ = ''; this.nextFeed_ = '';
this.done_ = false; this.done_ = false;
this.fetchedResultsNum_ = 0; this.fetchedResultsNum_ = 0;
......
...@@ -1321,8 +1321,7 @@ DirectoryModel.prototype.search = function(query, ...@@ -1321,8 +1321,7 @@ DirectoryModel.prototype.search = function(query,
this.currentFileListContext_, this.currentFileListContext_,
this.getCurrentDirEntry(), this.getCurrentDirEntry(),
this.currentDirContents_.getLastNonSearchDirectoryEntry(), this.currentDirContents_.getLastNonSearchDirectoryEntry(),
query, query);
DirectoryContentsDriveSearch.SearchType.SEARCH_FULL);
} else { } else {
newDirContents = new DirectoryContentsLocalSearch( newDirContents = new DirectoryContentsLocalSearch(
this.currentFileListContext_, this.getCurrentDirEntry(), query); this.currentFileListContext_, this.getCurrentDirEntry(), query);
......
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