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

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed)

Created:
5 years, 7 months ago by dtapuska
Modified:
5 years, 7 months ago
CC:
chromium-reviews, oshima+watch_chromium.org, zea+watch_chromium.org, chromoting-reviews_chromium.org, posciak+watch_chromium.org, vabr+watchlist_chromium.org, browser-components-watch_chromium.org, noyau+watch_chromium.org, aandrey+blink_chromium.org, stevenjb+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, tim+watch_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, Matt Giuca, mlamouri+watch-geolocation_chromium.org, grt+watch_chromium.org, samuong+watch_chromium.org, dzhioev+watch_chromium.org, pvalenzuela+watch_chromium.org, rlp+watch_chromium.org, jochen+watch_chromium.org, devtools-reviews_chromium.org, groby+spellwatch_chromium.org, chromium-apps-reviews_chromium.org, mkwst+watchlist-passwords_chromium.org, mlamouri+watch-content_chromium.org, tapted, rouslan+spellwatch_chromium.org, dkrahn+watch_chromium.org, feature-media-reviews_chromium.org, pam+watch_chromium.org, asvitkine+watch_chromium.org, Michael van Ouwerkerk, gcasto+watchlist_chromium.org, rouslan+autofillwatch_chromium.org, maniscalco+watch_chromium.org, tfarina, maxbogue+watch_chromium.org, mcasas+watch_chromium.org, yurys, plaree+watch_chromium.org, davemoore+watch_chromium.org, darin-cc_chromium.org, estade+watch_chromium.org, stgao, James Su, wjia+watch_chromium.org, pfeldman, varkha
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adjust URLFetcher::Create API so that object is returned as scoped_ptr. Most interfaces were storing the object in a scoped_ptr already. This adjusts the API so that it is a little clearer of the ownership transfer. A number of clients put the URLFetcher in a table and do memory management on it themselves; this is likely templatable code for a future CL. The scope of this CL was to change the API but no control flow changes. Making this change found one memory leak; (http://crbug.com/482459) has been addressed separately. BUG=371201 TESTS=net_unittests google_api_unittests TBR=jochen@chromium.org, thakis@chromium.org, oshima@chromium.org, armansito@chromium.org, reillyg@chromium.org, rogerta@chromium.org, stuartmorgan@chromium.org, wez@chromium.org, pavely@chromium.org, rouslan@chromium.org Committed: https://crrev.com/dafcf89b36898f4f4afc010824879290b9e51e3a Cr-Commit-Position: refs/heads/master@{#327901}

Patch Set 1 #

Patch Set 2 : Fix chromeos test case build failure #

Patch Set 3 : Fix another failure missed by my regex #

Total comments: 18

Patch Set 4 : Address two nits #

Patch Set 5 : Remove unneeded Pass() calls #

Unified diffs Side-by-side diffs Delta from patch set Stats (+450 lines, -526 lines) Patch
M chrome/browser/apps/drive/drive_app_converter.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/autocomplete/zero_suggest_provider.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/bitmap_fetcher/bitmap_fetcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/attestation/attestation_ca_client.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/customization/customization_document.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/extensions/wallpaper_api.cc View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/chromeos/login/screens/terms_of_service_screen.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/wizard_controller_browsertest.cc View 1 2 1 chunk +11 lines, -14 lines 0 comments Download
M chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc View 1 2 3 2 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/policy/upload_job.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/devtools/devtools_ui_bindings.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_url_operation.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/blacklist_state_fetcher.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/extensions/blob_reader.cc View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/extensions/install_signer.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/webstore_data_fetcher.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/intranet_redirect_detector.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/local_discovery/gcd_api_flow_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/local_discovery/privet_url_fetcher.cc View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/media/webrtc_log_uploader.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/metrics/variations/variations_service.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/net/sdch_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profile_resetter/brandcode_config_fetcher.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile_downloader.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_service.cc View 3 chunks +11 lines, -11 lines 0 comments Download
M chrome/browser/safe_browsing/download_protection_service.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/malware_details_cache.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/ping_manager.cc View 2 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/safe_browsing/protocol_manager.cc View 4 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_test.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/safe_browsing/two_phase_uploader.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/spellchecker/feedback_sender.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/spellchecker/spelling_service_client.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/spellchecker/spelling_service_client.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/spellchecker/spelling_service_client_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/supervised_user/child_accounts/family_info_fetcher.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/supervised_user/child_accounts/permission_request_creator_apiary.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/supervised_user/experimental/supervised_user_async_url_checker.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/supervised_user/legacy/supervised_user_refresh_token_fetcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_stopped_reporter.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/tracing/crash_service_uploader.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/app_list/search/common/json_response_fetcher.cc View 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/ui/app_list/search/common/url_icon_source.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/app_list/start_page_service.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_navigation_observer.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/about_ui.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/devtools_ui.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/service/cloud_print/cloud_print_url_fetcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/chromedriver/net/net_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M chromeos/geolocation/simple_geolocation_request.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chromeos/timezone/timezone_request.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/autofill/content/browser/wallet/wallet_client.cc View 1 chunk +1 line, -2 lines 0 comments Download
M components/autofill/content/browser/wallet/wallet_signin_helper.cc View 1 chunk +1 line, -2 lines 0 comments Download
M components/autofill/core/browser/autofill_download_manager.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M components/autofill/core/browser/wallet/real_pan_wallet_client.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/captive_portal/captive_portal_detector.cc View 1 chunk +1 line, -4 lines 0 comments Download
M components/copresence/rpc/http_post.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/dom_distiller/core/distiller_url_fetcher.h View 1 chunk +1 line, -1 line 0 comments Download
M components/dom_distiller/core/distiller_url_fetcher.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M components/domain_reliability/uploader.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/enhanced_bookmarks/bookmark_server_cluster_service.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/enhanced_bookmarks/bookmark_server_search_service.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/feedback/feedback_uploader_chrome.cc View 1 chunk +8 lines, -6 lines 0 comments Download
M components/gcm_driver/gcm_channel_status_request.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/google/core/browser/google_url_tracker.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/history/core/browser/web_history_service.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M components/invalidation/gcm_network_channel.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/metrics/net/net_metrics_log_uploader.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/omnibox/base_search_provider.cc View 1 chunk +3 lines, -5 lines 0 comments Download
M components/omnibox/search_provider.h View 1 chunk +4 lines, -3 lines 0 comments Download
M components/omnibox/search_provider.cc View 3 chunks +8 lines, -10 lines 0 comments Download
M components/password_manager/core/browser/affiliation_fetcher.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/policy/core/common/cloud/device_management_service.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M components/policy/core/common/cloud/external_policy_data_fetcher.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M components/policy/core/common/cloud/user_info_fetcher.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M components/precache/core/precache_fetcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/rappor/log_uploader.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/search_engines/template_url_fetcher.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/search_provider_logos/logo_tracker.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/signin/core/browser/gaia_cookie_manager_service.h View 1 chunk +1 line, -1 line 0 comments Download
M components/signin/core/browser/gaia_cookie_manager_service.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M components/suggestions/suggestions_service.h View 1 chunk +1 line, -1 line 0 comments Download
M components/suggestions/suggestions_service.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M components/translate/core/browser/translate_url_fetcher.cc View 1 chunk +1 line, -5 lines 0 comments Download
M components/update_client/request_sender.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/update_client/url_fetcher_downloader.cc View 1 chunk +1 line, -2 lines 0 comments Download
M components/update_client/utils.h View 2 chunks +2 lines, -1 line 0 comments Download
M components/update_client/utils.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M components/web_resource/web_resource_service.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/geolocation/network_location_request.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/speech/google_one_shot_remote_engine.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M content/browser/speech/google_streaming_remote_engine.cc View 2 chunks +4 lines, -5 lines 0 comments Download
M content/shell/browser/shell_devtools_frontend.cc View 1 chunk +1 line, -1 line 0 comments Download
M device/test/usb_test_gadget_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/browser/content_hash_fetcher.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/updater/extension_downloader.cc View 2 chunks +5 lines, -7 lines 0 comments Download
M extensions/browser/updater/update_service_browsertest.cc View 4 chunks +9 lines, -8 lines 0 comments Download
M google_apis/drive/base_requests.cc View 1 chunk +1 line, -1 line 0 comments Download
M google_apis/gaia/gaia_auth_fetcher.h View 1 chunk +1 line, -1 line 0 comments Download
M google_apis/gaia/gaia_auth_fetcher.cc View 15 chunks +41 lines, -88 lines 0 comments Download
M google_apis/gaia/gaia_oauth_client.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M google_apis/gaia/gaia_oauth_client_unittest.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M google_apis/gaia/mock_url_fetcher_factory.h View 1 chunk +3 lines, -2 lines 0 comments Download
M google_apis/gaia/oauth2_access_token_fetcher_impl.cc View 2 chunks +9 lines, -11 lines 0 comments Download
M google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc View 2 chunks +10 lines, -2 lines 0 comments Download
M google_apis/gaia/oauth2_api_call_flow.h View 1 chunk +3 lines, -3 lines 0 comments Download
M google_apis/gaia/oauth2_api_call_flow.cc View 2 chunks +4 lines, -6 lines 0 comments Download
M google_apis/gaia/oauth2_api_call_flow_unittest.cc View 2 chunks +14 lines, -7 lines 0 comments Download
M google_apis/gcm/engine/checkin_request.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M google_apis/gcm/engine/registration_request.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M google_apis/gcm/engine/unregistration_request.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/net/image_fetcher.mm View 1 chunk +2 lines, -3 lines 0 comments Download
M ios/chrome/browser/net/retryable_url_fetcher.mm View 1 chunk +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/updatable_config/updatable_config_base.mm View 1 chunk +1 line, -1 line 0 comments Download
M ios/web/webui/url_fetcher_block_adapter.mm View 1 chunk +1 line, -1 line 0 comments Download
M net/server/http_server_unittest.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M net/test/embedded_test_server/embedded_test_server_unittest.cc View 5 chunks +14 lines, -26 lines 0 comments Download
M net/tools/get_server_time/get_server_time.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/url_request/test_url_fetcher_factory.h View 3 chunks +12 lines, -12 lines 0 comments Download
M net/url_request/test_url_fetcher_factory.cc View 5 chunks +9 lines, -10 lines 0 comments Download
M net/url_request/url_fetcher.h View 2 chunks +10 lines, -11 lines 0 comments Download
M net/url_request/url_fetcher.cc View 1 chunk +10 lines, -9 lines 0 comments Download
M net/url_request/url_fetcher_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/dns_blackhole_checker.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/host/setup/service_client.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/protocol/chromium_port_allocator.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/test/remote_host_info_fetcher.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M rlz/lib/financial_ping.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M sync/internal_api/attachments/attachment_downloader_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M sync/internal_api/attachments/attachment_uploader_impl.cc View 1 chunk +1 line, -2 lines 0 comments Download
M sync/internal_api/http_bridge.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M sync/test/accounts_client/test_accounts_client.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/libaddressinput/chromium/chrome_metadata_source.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
dtapuska
Adding Ryan and jam as reviewers. Since Ryan opened the bug; and since this is ...
5 years, 7 months ago (2015-04-29 21:13:32 UTC) #2
vabr (Chromium)
Drive by: components/password_manager/core/browser/affiliation_fetcher.cc LGTM Cheers, Vaclav
5 years, 7 months ago (2015-04-30 04:44:40 UTC) #4
vabr (Chromium)
On 2015/04/30 04:44:40, vabr (Chromium) wrote: > Drive by: components/password_manager/core/browser/affiliation_fetcher.cc LGTM > Cheers, > Vaclav ...
5 years, 7 months ago (2015-04-30 04:45:46 UTC) #5
jam
On 2015/04/29 21:13:32, Dave Tapuska wrote: > Adding Ryan and jam as reviewers. Since Ryan ...
5 years, 7 months ago (2015-04-30 15:42:35 UTC) #6
Ryan Sleevi
Thanks for doing this Dave; I started reviewing this and then noticed your remark about ...
5 years, 7 months ago (2015-04-30 18:23:45 UTC) #7
dtapuska
https://codereview.chromium.org/1117703002/diff/40001/chrome/browser/safe_browsing/client_side_detection_service.cc File chrome/browser/safe_browsing/client_side_detection_service.cc (right): https://codereview.chromium.org/1117703002/diff/40001/chrome/browser/safe_browsing/client_side_detection_service.cc#newcode373 chrome/browser/safe_browsing/client_side_detection_service.cc:373: net::URLFetcher::POST, this).release(); On 2015/04/30 18:23:44, Ryan Sleevi wrote: > ...
5 years, 7 months ago (2015-04-30 19:05:57 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1117703002/80001
5 years, 7 months ago (2015-05-01 13:52:00 UTC) #11
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 7 months ago (2015-05-01 13:58:44 UTC) #12
commit-bot: I haz the power
5 years, 7 months ago (2015-05-01 14:27:06 UTC) #13
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/dafcf89b36898f4f4afc010824879290b9e51e3a
Cr-Commit-Position: refs/heads/master@{#327901}

Powered by Google App Engine
This is Rietveld 408576698