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

Unified Diff: chrome/browser/download/downloads_extension_api.h

Issue 7825035: Implement chrome.experimental.downloads.search() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rewrite 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/download/downloads_extension_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/downloads_extension_api.h
diff --git a/chrome/browser/extensions/extension_downloads_api.h b/chrome/browser/download/downloads_extension_api.h
similarity index 93%
rename from chrome/browser/extensions/extension_downloads_api.h
rename to chrome/browser/download/downloads_extension_api.h
index b0cf0e90cc3db310d6ae215aa9250fcfbb2156c4..4b4f8dbefe545776f630d4763f9ce327738a74a5 100644
--- a/chrome/browser/extensions/extension_downloads_api.h
+++ b/chrome/browser/download/downloads_extension_api.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_DOWNLOADS_API_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_DOWNLOADS_API_H_
+#ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOADS_EXTENSION_API_H_
+#define CHROME_BROWSER_DOWNLOAD_DOWNLOADS_EXTENSION_API_H_
#pragma once
#include <map>
@@ -16,6 +16,7 @@
#include "chrome/browser/extensions/extension_function.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_manager.h"
+#include "content/browser/download/download_query.h"
namespace base {
class DictionaryValue;
@@ -140,6 +141,16 @@ class DownloadsSearchFunction : public SyncDownloadsFunction {
virtual void RunInternal() OVERRIDE;
private:
+ template <typename ValueType>
+ bool Parse(
+ base::DictionaryValue* json,
+ const char* json_name,
+ download_util::DownloadQuery::FilterFieldName filter_name);
+
+ download_util::DownloadQuery query_;
+ int get_id_;
+ bool has_get_id_;
+
DISALLOW_COPY_AND_ASSIGN(DownloadsSearchFunction);
};
@@ -274,4 +285,4 @@ class ExtensionDownloadsEventRouter : public DownloadManager::Observer {
DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter);
};
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DOWNLOADS_API_H_
+#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOADS_EXTENSION_API_H_
« no previous file with comments | « no previous file | chrome/browser/download/downloads_extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698