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

Issue 2716583003: Rename Origin.unique() to opaque().

Created:
3 years, 10 months ago by iclelland
Modified:
3 years, 4 months ago
Reviewers:
ortuno, Mike West
CC:
Aaron Boodman, abarth-chromium, blink-reviews, blink-reviews-api_chromium.org, blink-worker-reviews_chromium.org, cbentzel+watch_chromium.org, chasej+watch_chromium.org, chfremer+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, cmumford, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, dbeam+watch-options_chromium.org, dglazkov+blink, einbinder+watch-test-runner_chromium.org, extensions-reviews_chromium.org, feature-media-reviews_chromium.org, gcasto+watchlist_chromium.org, horo+watch_chromium.org, iclelland+watch_chromuim.org, jam, jkarlin+watch_chromium.org, jochen+watch_chromium.org, jsbell+idb_chromium.org, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, mcasas+watch+vc_chromium.org, media-router+watch_chromium.org, michaeln, michaelpg+watch-options_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-permissions_chromium.org, mlamouri+watch-test-runner_chromium.org, nasko+codewatch_chromium.org, net-reviews_chromium.org, nhiroki, ortuno+watch_chromium.org, Peter Beverloo, posciak+watch_chromium.org, qsr+mojo_chromium.org, raymes+watch_chromium.org, scheib+watch_chromium.org, serviceworker-reviews, shimazu+serviceworker_chromium.org, subresource-filter-reviews_chromium.org, tfarina, tzik, vabr+watchlistpasswordmanager_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Rename Origin.unique() to opaque(). The Origin class has gotten out of date with respect to the spec (and with blink::SecurityOrigin); the concept of a "unique" origin has mostly been replaced with "opaque"ness. This almost purely mechanical CL updates that terminology; a follow-up CL will take care of the small semantic difference between the two concepts. BUG=695622 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_site_isolation;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Patch Set 1 #

Patch Set 2 : Android fixes #

Patch Set 3 : Mac fixes #

Total comments: 2

Patch Set 4 : Update new uses post-rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -217 lines) Patch
M chrome/browser/android/preferences/website_preference_bridge.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/budget_service/budget_manager.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/media/android/cdm/media_drm_storage_factory.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/notifications/notification_channels_provider_android.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/credential_android.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/password_manager/native_backend_gnome_x.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/native_backend_gnome_x_unittest.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/native_backend_kwallet_x.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/native_backend_libsecret.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/native_backend_libsecret_unittest.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/save_password_infobar_delegate_android.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/plugins/plugin_info_message_filter.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/site_details.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/subresource_filter/subresource_filter_browsertest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/android/bluetooth_chooser_android.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/passwords/passwords_list_view_controller.mm View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/page_info/page_info.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/passwords/manage_passwords_bubble_model.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/passwords/manage_passwords_view_utils.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/passwords/password_manager_presenter.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/passwords/manage_password_items_view.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/site_settings_helper.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/renderer/content_settings_observer.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M components/error_page/common/localized_error.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/password_manager/core/browser/credential_manager_impl.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M components/password_manager/core/browser/credential_manager_impl_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/password_manager/core/browser/credential_manager_pending_request_task.cc View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M components/password_manager/core/browser/form_fetcher_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/password_manager/core/browser/login_database.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M components/password_manager/core/browser/password_form_manager.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M components/password_manager/core/browser/password_manager_util.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/password_manager/core/browser/password_syncable_service.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/password_manager/core/browser/password_syncable_service_unittest.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M components/password_manager/core/browser/psl_matching_helper.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/password_manager/core/common/credential_manager_types_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M components/subresource_filter/content/browser/async_document_subresource_filter.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/subresource_filter/core/common/first_party_origin.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M components/url_pattern_index/url_pattern_index.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M components/url_pattern_index/url_rule_test_support.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/background_fetch/background_fetch_cross_origin_filter.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/bluetooth/bluetooth_allowed_devices_map.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/bluetooth/bluetooth_device_chooser_controller.cc View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M content/browser/browsing_data/browsing_data_filter_builder_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/browsing_data/clear_site_data_throttle.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/cache_storage/cache_storage_dispatcher_host.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/child_process_security_policy_impl.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/frame_host/frame_tree_browsertest.cc View 1 2 3 7 chunks +10 lines, -10 lines 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/frame_host/navigator_impl_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/indexed_db/indexed_db_dispatcher_host.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/isolated_origin_util.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/database_message_filter.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/media/media_devices_dispatcher_host.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_content_settings_proxy_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_database.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/shared_worker/shared_worker_content_settings_proxy_impl.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/webauth/authenticator_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/child/blink_platform_impl_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/child/db_message_filter.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M content/common/content_security_policy/csp_context.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/cross_site_document_classifier.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/common/origin_trials/trial_token.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/origin_util.cc View 1 2 3 3 chunks +6 lines, -6 lines 0 comments Download
M content/public/common/common_param_traits.cc View 1 2 3 3 chunks +7 lines, -7 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output_dev.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_bluetooth_chooser_factory.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/shell_content_browser_client.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/extension_web_contents_observer.cc View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download
M media/audio/audio_output_device.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_fetcher_core.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/mojo/SecurityOriginStructTraits.h View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/public/platform/WebSecurityOrigin.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M url/mojo/origin.mojom View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M url/mojo/origin_struct_traits.h View 1 2 3 2 chunks +4 lines, -6 lines 0 comments Download
M url/mojo/url_gurl_struct_traits_unittest.cc View 1 2 3 1 chunk +8 lines, -8 lines 0 comments Download
M url/origin.h View 1 2 3 8 chunks +17 lines, -13 lines 0 comments Download
M url/origin.cc View 1 2 3 8 chunks +9 lines, -9 lines 0 comments Download
M url/origin_unittest.cc View 1 2 3 8 chunks +16 lines, -16 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 31 (23 generated)
iclelland
+r mkwst -- can you PTAL?
3 years, 10 months ago (2017-02-23 21:48:11 UTC) #17
dcheng
Will there be a followup patch on the Blink side? I also think it's also ...
3 years, 10 months ago (2017-02-23 21:57:45 UTC) #19
ortuno
https://codereview.chromium.org/2716583003/diff/40001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc File content/browser/bluetooth/bluetooth_device_chooser_controller.cc (right): https://codereview.chromium.org/2716583003/diff/40001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc#newcode351 content/browser/bluetooth/bluetooth_device_chooser_controller.cc:351: // The above also excludes opaque origins, which are ...
3 years, 10 months ago (2017-02-23 21:59:34 UTC) #21
iclelland
On 2017/02/23 21:57:45, dcheng wrote: > Will there be a followup patch on the Blink ...
3 years, 10 months ago (2017-02-23 23:32:37 UTC) #22
dcheng
On 2017/02/23 23:32:37, iclelland wrote: > On 2017/02/23 21:57:45, dcheng wrote: > > Will there ...
3 years, 10 months ago (2017-02-23 23:36:35 UTC) #23
Marijn Kruisselbrink
On 2017/02/23 at 23:36:35, dcheng wrote: > On 2017/02/23 23:32:37, iclelland wrote: > > On ...
3 years, 10 months ago (2017-02-23 23:40:45 UTC) #24
dcheng
On 2017/02/23 23:40:45, Marijn Kruisselbrink wrote: > On 2017/02/23 at 23:36:35, dcheng wrote: > > ...
3 years, 10 months ago (2017-02-23 23:55:13 UTC) #25
Mike West
3 years, 10 months ago (2017-02-24 08:01:45 UTC) #26
This LGTM, but I don't own most of the code. :)

https://codereview.chromium.org/2716583003/diff/40001/content/browser/bluetoo...
File content/browser/bluetooth/bluetooth_device_chooser_controller.cc (right):

https://codereview.chromium.org/2716583003/diff/40001/content/browser/bluetoo...
content/browser/bluetooth/bluetooth_device_chooser_controller.cc:351: // The
above also excludes opaque origins, which are not even same-origin with
On 2017/02/23 at 21:59:34, ortuno wrote:
> Do opaque origins still generate the same key in maps? If so could you change
this DCHECK to an if statement?
> 
> // Opaque origins generate the same key in maps, therefore are not
> // supported.
> // TODO(crbug.com/...): Change to REQUEST_DEVICE_FROM_UNSUPPORTED_ORIGIN.
> if (request_origin.opaque()) {
>   PostErrorCallback(blink::mojom::WebBluetoothResult::
>                         REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME);
> }
> 
> Please CC me and juncai in that bug.

I'd suggest doing this in a separate patch. Mechanical changes are best kept
mechanical.

Powered by Google App Engine
This is Rietveld 408576698