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

Unified Diff: content/browser/download/download_manager.h

Issue 7825035: Implement chrome.experimental.downloads.search() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: " Created 9 years, 2 months 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
Index: content/browser/download/download_manager.h
diff --git a/content/browser/download/download_manager.h b/content/browser/download/download_manager.h
index 4a8c4a0686a44878e84c590dfe70c490154f3929..bcf001cd9b689ef84e656fed235d6739d30f4afc 100644
--- a/content/browser/download/download_manager.h
+++ b/content/browser/download/download_manager.h
@@ -46,6 +46,7 @@
#include "base/time.h"
#include "content/browser/browser_thread.h"
#include "content/browser/download/download_item.h"
+#include "content/browser/download/download_query.h"
#include "content/browser/download/download_request_handle.h"
#include "content/browser/download/download_status_updater_delegate.h"
#include "content/common/content_export.h"
@@ -106,6 +107,14 @@ class CONTENT_EXPORT DownloadManager
// are in progress or have completed.
void GetAllDownloads(const FilePath& dir_path, DownloadVector* result);
+ // If |results| or |json_results| is non-NULL, fill it/them with DownloadItems
+ // matching |query|. If |error_msg| is non-NULL, set it to an error message if
+ // |query| was mal-formed.
Randy Smith (Not in Mondays) 2011/10/10 18:09:42 This interface makes me uncomfortable for two reas
benjhayden 2011/10/13 14:07:34 Done.
+ bool Search(const download_util::DownloadQuery& query,
+ std::string* error_msg,
+ DownloadVector* results,
+ base::ListValue* json_results) const;
+
// Returns all non-temporary downloads matching |query|. Empty query matches
// everything.
void SearchDownloads(const string16& query, DownloadVector* result);

Powered by Google App Engine
This is Rietveld 408576698