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

Unified Diff: chrome/browser/importer/toolbar_importer.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/importer/toolbar_importer.cc
===================================================================
--- chrome/browser/importer/toolbar_importer.cc (revision 106929)
+++ chrome/browser/importer/toolbar_importer.cc (working copy)
@@ -17,6 +17,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/libxml_utils.h"
#include "content/browser/browser_thread.h"
+#include "content/common/net/url_fetcher.h"
#include "grit/generated_resources.h"
// Toolbar5Importer
@@ -96,25 +97,21 @@
}
}
-void Toolbar5Importer::OnURLFetchComplete(
- const URLFetcher* source,
- const GURL& url,
- const net::URLRequestStatus& status,
- int response_code,
- const net::ResponseCookies& cookies,
- const std::string& data) {
+void Toolbar5Importer::OnURLFetchComplete(const URLFetcher* source) {
if (cancelled()) {
EndImport();
return;
}
- if (200 != response_code) { // HTTP/Ok
+ if (200 != source->response_code()) { // HTTP/Ok
// Cancelling here will update the UI and bypass the rest of bookmark
// import.
EndImportBookmarks();
return;
}
+ std::string data;
+ source->GetResponseAsString(&data);
switch (state_) {
case GET_AUTHORIZATION_TOKEN:
GetBookmarkDataFromServer(data);

Powered by Google App Engine
This is Rietveld 408576698