Code review - Issue 6200066: rlz: Move UrlFetcher to net, part 1https://codereview.appspot.com/2012-05-11T21:52:16+00:00rietveld
Message from unknown
2012-05-11T21:39:52+00:00thakisurn:md5:946ccb45e7ceb2ebebf0127d10653155
Message from akalin@chromium.org
2012-05-11T21:41:28+00:00akalinurn:md5:ea9c5d0c9afc380ebf860f7255141ff3
LGTM
Message from thakis@chromium.org
2012-05-11T21:42:00+00:00thakisurn:md5:e2e626c21a5d7c7d6f192f8408f16b2a
fyi
Message from rogerta@chromium.org
2012-05-11T21:52:16+00:00Roger Tawaurn:md5:11c691b93d3212bd821428f91bbc0dbf
Lgtm
On May 11, 2012 5:42 PM, <thakis@chromium.org> wrote:
> Reviewers: akalin,
>
> Message:
> fyi
>
> Description:
> rlz: Move UrlFetcher to net, part 1
>
> BUG=chromium:118220
> TEST=none
>
>
> Please review this at https://codereview.appspot.**com/6200066/<https://codereview.appspot.com/6200066/>
>
> Affected files:
> M lib/financial_ping.cc
>
>
> Index: lib/financial_ping.cc
> diff --git a/lib/financial_ping.cc b/lib/financial_ping.cc
> index 28ecd96f5964c61278da2353437e1a**6d0efbaff7..**
> 96425c6599edc7ee20faf52fd40bf9**4e48117b5f 100644
> --- a/lib/financial_ping.cc
> +++ b/lib/financial_ping.cc
> @@ -51,6 +51,8 @@ class InternetHandle {
> #include "content/public/common/url_**fetcher_delegate.h"
> #include "googleurl/src/gurl.h"
> #include "net/base/load_flags.h"
> +#include "net/url_request/url_fetcher.**h"
> +#include "net/url_request/url_fetcher_**delegate.h"
> #include "net/url_request/url_request_**context.h"
> #include "net/url_request/url_request_**context_getter.h"
>
> @@ -195,13 +197,13 @@ namespace {
> class FinancialPingUrlFetcherDelegat**e : public
> content::URLFetcherDelegate {
> public:
> FinancialPingUrlFetcherDelegat**e(MessageLoop* loop) : loop_(loop) { }
> - virtual void OnURLFetchComplete(const content::URLFetcher* source);
> + virtual void OnURLFetchComplete(const net::URLFetcher* source);
> private:
> MessageLoop* loop_;
> };
>
> void FinancialPingUrlFetcherDelegat**e::OnURLFetchComplete(
> - const content::URLFetcher* source) {
> + const net::URLFetcher* source) {
> loop_->Quit();
> }
>
> @@ -274,8 +276,8 @@ bool FinancialPing::PingServer(**const char* request,
> std::string* response) {
> kFinancialServer, kFinancialPort,
> request);
>
> - scoped_ptr<content::**URLFetcher> fetcher(content::URLFetcher::**
> Create(
> - GURL(url), content::URLFetcher::GET, &delegate));
> + scoped_ptr<net::URLFetcher> fetcher(content::URLFetcher::**Create(
> + GURL(url), net::URLFetcher::GET, &delegate));
>
> fetcher->SetLoadFlags(net::**LOAD_DISABLE_CACHE |
> net::LOAD_DO_NOT_SEND_AUTH_**DATA |
> @@ -291,7 +293,7 @@ bool FinancialPing::PingServer(**const char* request,
> std::string* response) {
> const base::TimeDelta kTimeout = base::TimeDelta::FromMinutes(**5);
> loop.PostTask(
> FROM_HERE,
> - base::Bind(&content::**URLFetcher::Start,
> base::Unretained(fetcher.get()**)));
> + base::Bind(&net::URLFetcher::**Start,
> base::Unretained(fetcher.get()**)));
> loop.**PostNonNestableDelayedTask(
> FROM_HERE, MessageLoop::QuitClosure(), kTimeout);
>
>
>
>