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

Unified Diff: chrome/browser/google/google_url_tracker.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/google/google_url_tracker.cc
===================================================================
--- chrome/browser/google/google_url_tracker.cc (revision 106929)
+++ chrome/browser/google/google_url_tracker.cc (working copy)
@@ -22,6 +22,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/common/net/url_fetcher.h"
#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "net/base/load_flags.h"
@@ -221,17 +222,12 @@
fetcher_->Start();
}
-void GoogleURLTracker::OnURLFetchComplete(const URLFetcher* source,
- const GURL& url,
- const net::URLRequestStatus& status,
- int response_code,
- const net::ResponseCookies& cookies,
- const std::string& data) {
+void GoogleURLTracker::OnURLFetchComplete(const URLFetcher* source) {
// Delete the fetcher on this function's exit.
scoped_ptr<URLFetcher> clean_up_fetcher(fetcher_.release());
// Don't update the URL if the request didn't succeed.
- if (!status.is_success() || (response_code != 200)) {
+ if (!source->status().is_success() || (source->response_code() != 200)) {
already_fetched_ = false;
return;
}
@@ -239,7 +235,8 @@
// See if the response data was one we want to use, and if so, convert to the
// appropriate Google base URL.
std::string url_str;
- TrimWhitespace(data, TRIM_ALL, &url_str);
+ source->GetResponseAsString(&url_str);
+ TrimWhitespace(url_str, TRIM_ALL, &url_str);
if (!StartsWithASCII(url_str, ".google.", false))
return;

Powered by Google App Engine
This is Rietveld 408576698