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

Issue 2481923002: [WIP] make GURL::path() return a StringPiece (Closed)

Created:
4 years, 1 month ago by Charlie Harrison
Modified:
4 years, 1 month ago
Reviewers:
vabr (Chromium), brettw
CC:
chromium-reviews, msramek+watch_chromium.org, skanuj+watch_chromium.org, tzik, dhollowa+watch_chromium.org, dougw+watch_chromium.org, nasko+codewatch_chromium.org, serviceworker-reviews, fukino+watch_chromium.org, markusheintz_, kinuko+watch, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, melevin+watch_chromium.org, Matt Giuca, grt+watch_chromium.org, samuong+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, raymes+watch_chromium.org, darin-cc_chromium.org, sync-reviews_chromium.org, devtools-reviews_chromium.org, loading-reviews_chromium.org, chromium-apps-reviews_chromium.org, blink-worker-reviews_chromium.org, jkarlin+watch_chromium.org, mlamouri+watch-content_chromium.org, kinuko+serviceworker, oka+watch_chromium.org, creis+watch_chromium.org, vabr+watchlistpasswordmanager_chromium.org, tapted, Peter Beverloo, yamaguchi+watch_chromium.org, Randy Smith (Not in Mondays), nhiroki, jochen+watch_chromium.org, jfweitz+watch_chromium.org, pam+watch_chromium.org, horo+watch_chromium.org, gcasto+watchlist_chromium.org, Jered, michaeln, shimazu+serviceworker_chromium.org, mlamouri+watch-test-runner_chromium.org, tfarina, donnd+watch_chromium.org, David Black, samarth+watch_chromium.org, Paweł Hajdan Jr., kmadhusu+watch_chromium.org, kinuko+fileapi, pfeldman, einbinder+watch-test-runner_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[WIP] make GURL::path() return a StringPiece Mostly a manual transform. BUG=

Patch Set 1 #

Patch Set 2 : fix nacl compile + sdch unit test #

Patch Set 3 : compile all on chromeos and android #

Patch Set 4 : mac! #

Patch Set 5 : debug #

Patch Set 6 : ios #

Patch Set 7 : oops #

Patch Set 8 : thanks asan #

Unified diffs Side-by-side diffs Delta from patch set Stats (+263 lines, -232 lines) Patch
M android_webview/native/aw_web_contents_delegate.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_about_handler.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/chrome_switches_browsertest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/app_mode/fake_cws.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/saml/saml_browsertest.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/signin/oauth2_browsertest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/devtools/device/port_forwarding_browsertest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/developer_private/developer_private_mangle.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/extension_action/browser_action_apitest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/extension_action/page_action_apitest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/webstore_inline_installer.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/importer/profile_writer.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/password_manager/password_store_mac.cc View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/plugins/plugin_info_message_filter.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_avatar_icon_util.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/search/iframe_source.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/search/most_visited_iframe_source.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/supervised_user/supervised_user_url_filter.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/task_manager/providers/web_contents/tab_contents_tag_browsertest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/oobe_ui.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/chromeos/login/screenlock_icon_source.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc View 1 2 6 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/devtools_ui.cc View 5 chunks +12 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/fileicon_source.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/chromeos/user_image_source.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/web_applications/web_app.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/cloud_print/cloud_print_helpers.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/app_categorizer.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/extensions/resource_request_policy.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/webstore_bindings.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/searchbox/searchbox.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/chromedriver/net/websocket.cc View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/utility/media_galleries/itunes_library_parser.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M components/arc/intent_helper/intent_filter.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M components/cloud_devices/common/cloud_devices_urls.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M components/content_settings/core/common/content_settings_pattern.cc View 4 chunks +6 lines, -4 lines 0 comments Download
M components/dom_distiller/core/page_features.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M components/domain_reliability/util.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/history/core/browser/top_sites_cache.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M components/history/core/browser/web_history_service.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/omnibox/browser/builtin_provider.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/password_manager/core/browser/password_form_manager.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M components/plugins/renderer/mobile_youtube_plugin.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M components/search_engines/template_url.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M components/sync/driver/sync_stopped_reporter.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/sync/engine_impl/attachments/attachment_uploader_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/sync/engine_impl/sync_manager_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/test_runner/mock_web_document_subresource_filter.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/url_matcher/url_matcher.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/appcache/appcache_storage_impl_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/appcache/appcache_update_job_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/find_request_manager_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/async_revalidation_manager_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/media/android/media_resource_getter_impl.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/webui/url_data_manager_backend.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/child/ftp_directory_listing_response_delegate.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/plugin_list.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M content/common/service_worker/service_worker_utils.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/layout_test/layout_test_browser_context.cc View 1 chunk +2 lines, -1 line 0 comments Download
M extensions/browser/extension_navigation_throttle.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M extensions/browser/extension_protocols.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M extensions/browser/info_map.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M extensions/browser/url_request_util.cc View 4 chunks +8 lines, -7 lines 0 comments Download
M extensions/common/file_util.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/common/url_pattern.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/renderer/script_context.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M extensions/renderer/user_script_injector.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M extensions/shell/browser/shell_nacl_browser_delegate.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M google_apis/drive/drive_api_requests.cc View 1 chunk +2 lines, -1 line 0 comments Download
M google_apis/drive/drive_api_requests_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M google_apis/drive/test_util.cc View 1 chunk +3 lines, -1 line 0 comments Download
M google_apis/gaia/fake_gaia.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M ios/net/cookies/cookie_cache_unittest.cc View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M ios/net/cookies/cookie_store_ios_unittest.mm View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ios/web/public/test/http_server.mm View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M ios/web/public/test/response_providers/file_based_response_provider_impl.mm View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ios/web/webui/crw_web_ui_manager_unittest.mm View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/base/filename_util.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M net/base/mac/url_conversions.mm View 1 2 1 chunk +1 line, -1 line 0 comments Download
M net/base/sdch_dictionary.h View 1 chunk +2 lines, -2 lines 0 comments Download
M net/base/sdch_dictionary.cc View 1 3 chunks +4 lines, -3 lines 0 comments Download
M net/base/sdch_dictionary_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M net/cert_net/nss_ocsp.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/cookies/canonical_cookie.h View 1 chunk +1 line, -1 line 0 comments Download
M net/cookies/canonical_cookie.cc View 3 chunks +3 lines, -4 lines 0 comments Download
M net/ftp/ftp_network_transaction.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M net/http/http_auth_controller.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M net/test/embedded_test_server/http_request.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/test/embedded_test_server/request_handler_util.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M net/test/url_request/url_request_mock_http_job.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/tools/quic/quic_in_memory_cache.cc View 4 chunks +6 lines, -4 lines 0 comments Download
M net/tools/quic/quic_in_memory_cache_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/tools/quic/quic_simple_server_session.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/sdch_dictionary_fetcher_unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M net/url_request/url_request_file_job.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/websockets/websocket_stream_cookie_test.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M storage/browser/fileapi/file_system_url_request_job.cc View 1 chunk +1 line, -1 line 0 comments Download
M storage/browser/fileapi/file_system_url_request_job_factory.cc View 1 chunk +1 line, -1 line 0 comments Download
M storage/common/fileapi/file_system_util.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M ui/base/webui/web_ui_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M url/gurl.h View 1 chunk +2 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 44 (35 generated)
Charlie Harrison
Brett, what do you think about this? I feel like there are tons of unnecessary ...
4 years, 1 month ago (2016-11-09 02:31:43 UTC) #34
vabr (Chromium)
FWIW, components/password_manager and chrome/browser/password_manager LGTM. I appreciate making the StringPiece a default to nudge code ...
4 years, 1 month ago (2016-11-09 09:20:37 UTC) #36
brettw
I considered this at the time I wrote this. I rejected this because most of ...
4 years, 1 month ago (2016-11-09 15:40:24 UTC) #37
Charlie Harrison
On 2016/11/09 15:40:24, brettw (ping on IM after 24h) wrote: > I considered this at ...
4 years, 1 month ago (2016-11-09 15:56:57 UTC) #38
brettw
BTW I'm enthusiastic about changing callers to using the _piece() variants when it's obvious they ...
4 years, 1 month ago (2016-11-09 16:56:52 UTC) #39
Charlie Harrison
On 2016/11/09 16:56:52, brettw (ping on IM after 24h) wrote: > BTW I'm enthusiastic about ...
4 years, 1 month ago (2016-11-09 17:15:04 UTC) #40
brettw
On 2016/11/09 17:15:04, Charlie Harrison wrote: > On 2016/11/09 16:56:52, brettw (ping on IM after ...
4 years, 1 month ago (2016-11-09 18:36:50 UTC) #41
mmenke
On 2016/11/09 18:36:50, brettw (ping on IM after 24h) wrote: > On 2016/11/09 17:15:04, Charlie ...
4 years, 1 month ago (2016-11-09 18:38:36 UTC) #42
Charlie Harrison
4 years, 1 month ago (2016-11-09 18:41:30 UTC) #43
On 2016/11/09 18:38:36, mmenke wrote:
> On 2016/11/09 18:36:50, brettw (ping on IM after 24h) wrote:
> > On 2016/11/09 17:15:04, Charlie Harrison wrote:
> > > On 2016/11/09 16:56:52, brettw (ping on IM after 24h) wrote:
> > > > BTW I'm enthusiastic about changing callers to using the _piece()
variants
> > > when
> > > > it's obvious they can do so. I did a pass for some of them a while ago.
> > > Sounds good. The dependent PS does this for some operator== checks and
I'll
> > > probably look for more easy cases.
> > > 
> > > > 
> > > > An intermediate step (which I'm not convinced is necessary or helpful
but
> we
> > > can
> > > > consider) is renaming the regular accessors host_as_string() or
something
> to
> > > > make more clear that you're making a copy and so people might look at
> > > > alternatives.
> > > Yeah, I'm thinking about that too. It is very heavy handed, but may help
> bring
> > > about more cultural acceptance of StringPiece-based APIs (where they are
> > > appropriate). //base and //net are good about including these, but other
> parts
> > > of the code usually opts for string APIs. I haven't made up my mind about
> this
> > > though.
> > 
> > Yeah, outside of net I don't think it matters that much.
> 
> I though this whole thing was inspired by some blink code doing a lot of
random
> weird stuff to GURLs, affecting perf, particularly when there are a lot of
> URLRequests?

Yes but I think that code (blink embedder) is much easier to audit manually, and
is shrinking all the time (blink onion soup effort).

Eventually we are hoping to live in a world without content/renderer or
chrome/renderer.

Powered by Google App Engine
This is Rietveld 408576698