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

Unified Diff: chrome/browser/tab_contents/spelling_menu_observer.cc

Issue 8373021: Convert URLFetcher::Delegates to use an interface in content/public/common. Also remove the old U... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and remove unncessary forward declares 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: chrome/browser/tab_contents/spelling_menu_observer.cc
===================================================================
--- chrome/browser/tab_contents/spelling_menu_observer.cc (revision 106929)
+++ chrome/browser/tab_contents/spelling_menu_observer.cc (working copy)
@@ -17,6 +17,7 @@
#include "chrome/browser/tab_contents/render_view_context_menu.h"
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/render_view_host.h"
+#include "content/common/net/url_fetcher.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -149,13 +150,7 @@
return true;
}
-void SpellingMenuObserver::OnURLFetchComplete(
- const URLFetcher* source,
- const GURL& url,
- const net::URLRequestStatus& status,
- int response,
- const net::ResponseCookies& cookies,
- const std::string& data) {
+void SpellingMenuObserver::OnURLFetchComplete(const URLFetcher* source) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
fetcher_.reset();
@@ -163,7 +158,9 @@
// Parse the response JSON and replace misspelled words in the |result_| text
// with their suggestions.
- succeeded_ = ParseResponse(response, data);
+ std::string data;
+ source->GetResponseAsString(&data);
+ succeeded_ = ParseResponse(source->response_code(), data);
if (!succeeded_)
result_ = l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_SPELLING_CORRECT);

Powered by Google App Engine
This is Rietveld 408576698