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

Unified Diff: chrome/browser/extensions/api/page_capture/page_capture_api.cc

Issue 10806072: Refactor chrome.pageCapture to use JSON schema compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | chrome/common/extensions/api/api.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/page_capture/page_capture_api.cc
diff --git a/chrome/browser/extensions/api/page_capture/page_capture_api.cc b/chrome/browser/extensions/api/page_capture/page_capture_api.cc
index 5b366fd3af3231ebb2b81d8583d747a6c3a757f0..d8b070ae47fdc08bd6e5d2075575a495a8ad126b 100644
--- a/chrome/browser/extensions/api/page_capture/page_capture_api.cc
+++ b/chrome/browser/extensions/api/page_capture/page_capture_api.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
+#include "chrome/common/extensions/api/page_capture.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/notification_details.h"
@@ -26,6 +27,8 @@ using content::WebContents;
using extensions::PageCaptureSaveAsMHTMLFunction;
using webkit_blob::ShareableFileReference;
+namespace SaveAsMHTML = extensions::api::page_capture::SaveAsMHTML;
+
namespace {
// Error messages.
@@ -55,13 +58,8 @@ void PageCaptureSaveAsMHTMLFunction::SetTestDelegate(TestDelegate* delegate) {
}
bool PageCaptureSaveAsMHTMLFunction::RunImpl() {
- DictionaryValue* args;
- EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args));
-
- if (!args->HasKey("tabId"))
- return false;
-
- EXTENSION_FUNCTION_VALIDATE(args->GetInteger("tabId", &tab_id_));
Mihai Parparita -not on Chrome 2012/07/30 23:51:26 Seems like you still need to populate the tab_id_
mitchellwrosen 2012/07/31 00:22:29 Whoops, my mistake. You're right.
+ scoped_ptr<SaveAsMHTML::Params> params(SaveAsMHTML::Params::Create(*args_));
+ EXTENSION_FUNCTION_VALIDATE(params.get());
AddRef(); // Balanced in ReturnFailure/ReturnSuccess()
« no previous file with comments | « no previous file | chrome/common/extensions/api/api.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698