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

Unified Diff: third_party/libaddressinput/chromium/chrome_downloader_impl.h

Issue 386873002: Reland "Use upstream libaddressinput in Chrome." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix iOS compile. Created 6 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
Index: third_party/libaddressinput/chromium/chrome_downloader_impl.h
diff --git a/third_party/libaddressinput/chromium/chrome_downloader_impl.h b/third_party/libaddressinput/chromium/chrome_downloader_impl.h
index 2f0bf0d703a3c3cd17f6bff6c832dcec5616677d..ff9ff9fd4a9bed8e2f99defe670297bfa3e93885 100644
--- a/third_party/libaddressinput/chromium/chrome_downloader_impl.h
+++ b/third_party/libaddressinput/chromium/chrome_downloader_impl.h
@@ -10,7 +10,7 @@
#include "base/memory/scoped_vector.h"
#include "net/url_request/url_fetcher_delegate.h"
-#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/downloader.h"
+#include "third_party/libaddressinput/src/cpp/include/libaddressinput/downloader.h"
namespace net {
class URLFetcher;
@@ -29,7 +29,7 @@ class ChromeDownloaderImpl : public ::i18n::addressinput::Downloader,
// ::i18n::addressinput::Downloader:
virtual void Download(const std::string& url,
- scoped_ptr<Callback> downloaded) OVERRIDE;
+ const Callback& downloaded) const OVERRIDE;
// net::URLFetcherDelegate:
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
@@ -38,16 +38,19 @@ class ChromeDownloaderImpl : public ::i18n::addressinput::Downloader,
struct Request {
Request(const std::string& url,
scoped_ptr<net::URLFetcher> fetcher,
- scoped_ptr<Callback> callback);
+ const Callback& callback);
std::string url;
// The data that's received.
std::string data;
// The object that manages retrieving the data.
scoped_ptr<net::URLFetcher> fetcher;
- scoped_ptr<Callback> callback;
+ const Callback& callback;
};
+ // Non-const version of Download().
+ void DoDownload(const std::string& url, const Callback& downloaded);
+
net::URLRequestContextGetter* const getter_; // weak
// Maps from active url fetcher to request metadata. The value is owned.

Powered by Google App Engine
This is Rietveld 408576698