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

Issue 12211076: Refactored FakeURLFetcher to make it more flexible (Closed)

Created:
7 years, 10 months ago by Noam Samuel (WRONG ACCOUNT)
Modified:
6 years, 12 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Refactored FakeURLFetcher to make it more flexible Added an optional parameter to the FakeURLFetcherFactory class that is a callback used to create the FakeURLFetcher. This can be used to add information to the FakeURLFetcher when it is created, such as HTTP headers or cookies. As part of an effort to fix https://code.google.com/p/chromium/issues/detail?id=176361 . BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=182821

Patch Set 1 #

Patch Set 2 : Fix lint issue #

Total comments: 4

Patch Set 3 : Implementing suggestion from commenters #

Patch Set 4 : Fix linter errors #

Total comments: 29

Patch Set 5 : Incorporated reviewer feedback #

Total comments: 14

Patch Set 6 : Interface change and stylistic changes per review comments #

Total comments: 8

Patch Set 7 : Style issues & changing to scoped_ptr callback interface #

Total comments: 6

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -54 lines) Patch
M chrome/browser/extensions/app_notify_channel_setup_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_service_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/safe_browsing/download_protection_service_unittest.cc View 1 2 3 4 5 5 chunks +5 lines, -5 lines 0 comments Download
M net/url_request/test_url_fetcher_factory.h View 1 2 3 4 5 6 7 4 chunks +80 lines, -5 lines 0 comments Download
M net/url_request/test_url_fetcher_factory.cc View 1 2 3 4 5 6 7 2 chunks +45 lines, -42 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Noam Samuel (WRONG ACCOUNT)
Hey, I'm from the cloud print team and I need to modify FakeURLFetcherFactory to make ...
7 years, 10 months ago (2013-02-07 21:44:47 UTC) #1
akalin
https://codereview.chromium.org/12211076/diff/5001/net/url_request/test_url_fetcher_factory.h File net/url_request/test_url_fetcher_factory.h (right): https://codereview.chromium.org/12211076/diff/5001/net/url_request/test_url_fetcher_factory.h#newcode323 net/url_request/test_url_fetcher_factory.h:323: virtual TestURLFetcher* CreateFakeURLFetcher(const GURL& URL, I'm confused by the ...
7 years, 10 months ago (2013-02-08 07:47:35 UTC) #2
Noam Samuel (WRONG ACCOUNT)
https://codereview.chromium.org/12211076/diff/5001/net/url_request/test_url_fetcher_factory.h File net/url_request/test_url_fetcher_factory.h (right): https://codereview.chromium.org/12211076/diff/5001/net/url_request/test_url_fetcher_factory.h#newcode323 net/url_request/test_url_fetcher_factory.h:323: virtual TestURLFetcher* CreateFakeURLFetcher(const GURL& URL, The main scenario I'm ...
7 years, 10 months ago (2013-02-08 16:27:09 UTC) #3
noelutz
https://codereview.chromium.org/12211076/diff/5001/net/url_request/test_url_fetcher_factory.h File net/url_request/test_url_fetcher_factory.h (right): https://codereview.chromium.org/12211076/diff/5001/net/url_request/test_url_fetcher_factory.h#newcode323 net/url_request/test_url_fetcher_factory.h:323: virtual TestURLFetcher* CreateFakeURLFetcher(const GURL& URL, I don't have a ...
7 years, 10 months ago (2013-02-08 18:21:40 UTC) #4
Noam Samuel (WRONG ACCOUNT)
https://codereview.chromium.org/12211076/diff/5001/net/url_request/test_url_fetcher_factory.h File net/url_request/test_url_fetcher_factory.h (right): https://codereview.chromium.org/12211076/diff/5001/net/url_request/test_url_fetcher_factory.h#newcode323 net/url_request/test_url_fetcher_factory.h:323: virtual TestURLFetcher* CreateFakeURLFetcher(const GURL& URL, Not sure how that ...
7 years, 10 months ago (2013-02-08 18:58:44 UTC) #5
akalin
On 2013/02/08 18:58:44, noamsml wrote: > One option that avoids subclassing would be to surface ...
7 years, 10 months ago (2013-02-09 01:00:49 UTC) #6
Noam Samuel (WRONG ACCOUNT)
Implemented akalin's suggestion.
7 years, 10 months ago (2013-02-09 03:40:29 UTC) #7
akalin
Overall approach looks good, but got some nits. https://codereview.chromium.org/12211076/diff/3002/net/url_request/test_url_fetcher_factory.h File net/url_request/test_url_fetcher_factory.h (right): https://codereview.chromium.org/12211076/diff/3002/net/url_request/test_url_fetcher_factory.h#newcode13 net/url_request/test_url_fetcher_factory.h:13: remove ...
7 years, 10 months ago (2013-02-12 23:10:10 UTC) #8
Noam Samuel (WRONG ACCOUNT)
https://codereview.chromium.org/12211076/diff/3002/net/url_request/test_url_fetcher_factory.h File net/url_request/test_url_fetcher_factory.h (right): https://codereview.chromium.org/12211076/diff/3002/net/url_request/test_url_fetcher_factory.h#newcode13 net/url_request/test_url_fetcher_factory.h:13: On 2013/02/12 23:10:10, akalin wrote: > remove extra newline ...
7 years, 10 months ago (2013-02-13 00:25:52 UTC) #9
akalin
https://codereview.chromium.org/12211076/diff/3002/net/url_request/test_url_fetcher_factory.h File net/url_request/test_url_fetcher_factory.h (right): https://codereview.chromium.org/12211076/diff/3002/net/url_request/test_url_fetcher_factory.h#newcode298 net/url_request/test_url_fetcher_factory.h:298: typedef base::Callback< FakeURLFetcher*( On 2013/02/13 00:25:52, Noam Samuel wrote: ...
7 years, 10 months ago (2013-02-13 20:44:00 UTC) #10
Noam Samuel (WRONG ACCOUNT)
https://codereview.chromium.org/12211076/diff/3002/net/url_request/test_url_fetcher_factory.h File net/url_request/test_url_fetcher_factory.h (right): https://codereview.chromium.org/12211076/diff/3002/net/url_request/test_url_fetcher_factory.h#newcode304 net/url_request/test_url_fetcher_factory.h:304: FakeURLFetcherFactory(); On 2013/02/13 20:44:01, akalin wrote: > On 2013/02/13 ...
7 years, 10 months ago (2013-02-13 21:37:45 UTC) #11
akalin
https://codereview.chromium.org/12211076/diff/13002/net/url_request/test_url_fetcher_factory.cc File net/url_request/test_url_fetcher_factory.cc (right): https://codereview.chromium.org/12211076/diff/13002/net/url_request/test_url_fetcher_factory.cc#newcode283 net/url_request/test_url_fetcher_factory.cc:283: URLFetcherDelegate* d, indentation https://codereview.chromium.org/12211076/diff/13002/net/url_request/test_url_fetcher_factory.h File net/url_request/test_url_fetcher_factory.h (right): https://codereview.chromium.org/12211076/diff/13002/net/url_request/test_url_fetcher_factory.h#newcode280 net/url_request/test_url_fetcher_factory.h:280: ...
7 years, 10 months ago (2013-02-13 22:17:48 UTC) #12
Noam Samuel (WRONG ACCOUNT)
https://codereview.chromium.org/12211076/diff/13002/net/url_request/test_url_fetcher_factory.cc File net/url_request/test_url_fetcher_factory.cc (right): https://codereview.chromium.org/12211076/diff/13002/net/url_request/test_url_fetcher_factory.cc#newcode283 net/url_request/test_url_fetcher_factory.cc:283: URLFetcherDelegate* d, On 2013/02/13 22:17:49, akalin wrote: > indentation ...
7 years, 10 months ago (2013-02-13 23:35:11 UTC) #13
akalin
lgtm, but please update the CL title and description before committing https://codereview.chromium.org/12211076/diff/18001/net/url_request/test_url_fetcher_factory.cc File net/url_request/test_url_fetcher_factory.cc (right): ...
7 years, 10 months ago (2013-02-14 14:52:06 UTC) #14
Noam Samuel (WRONG ACCOUNT)
OK, fixed the description and CL name. https://codereview.chromium.org/12211076/diff/18001/net/url_request/test_url_fetcher_factory.cc File net/url_request/test_url_fetcher_factory.cc (right): https://codereview.chromium.org/12211076/diff/18001/net/url_request/test_url_fetcher_factory.cc#newcode331 net/url_request/test_url_fetcher_factory.cc:331: return scoped_ptr<FakeURLFetcher> ...
7 years, 10 months ago (2013-02-14 18:08:11 UTC) #15
akalin
still lgtm although it would be nice to have a bug for your larger task ...
7 years, 10 months ago (2013-02-14 20:22:39 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/noamsml@google.com/12211076/16003
7 years, 10 months ago (2013-02-14 22:07:27 UTC) #17
commit-bot: I haz the power
Presubmit check for 12211076-16003 failed and returned exit status 1. INFO:root:Found 5 file(s). Running presubmit ...
7 years, 10 months ago (2013-02-14 22:07:31 UTC) #18
Noam Samuel (WRONG ACCOUNT)
Hey, could people who are owners in net/, chrome/browser/safe_browsing/, and chrome/browser/extensions/ take a look at ...
7 years, 10 months ago (2013-02-14 22:14:48 UTC) #19
akalin
On 2013/02/14 22:14:48, Noam Samuel wrote: > Hey, could people who are owners in net/, ...
7 years, 10 months ago (2013-02-14 22:15:37 UTC) #20
Noam Samuel (WRONG ACCOUNT)
Since I forgot +aa@chromium.org for chrome/browser/extensions/ OWNERS +mattm@chromium.org for net/ OWNERS and chrome/browser/safe_browsing/ OWNERS
7 years, 10 months ago (2013-02-14 22:23:50 UTC) #21
mattm
In the description you can put the bug number in the BUG= line. net & ...
7 years, 10 months ago (2013-02-14 22:31:14 UTC) #22
Aaron Boodman
lgtm
7 years, 10 months ago (2013-02-15 18:50:09 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/noamsml@google.com/12211076/16003
7 years, 10 months ago (2013-02-15 18:51:10 UTC) #24
commit-bot: I haz the power
7 years, 10 months ago (2013-02-15 21:06:00 UTC) #25
Message was sent while issue was closed.
Change committed as 182821

Powered by Google App Engine
This is Rietveld 408576698