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

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed)

Created:
7 years, 8 months ago by jam
Modified:
7 years, 8 months ago
Reviewers:
joth, brettw, Ilya Sherman
CC:
chromium-reviews, MAD, nkostylev+watch_chromium.org, dhollowa+watch_chromium.org, dougw+watch_chromium.org, ahutter, browser-components-watch_chromium.org, gideonwald, dbeam+watch-autofill_chromium.org, ajwong+watch_chromium.org, stevenjb+watch_chromium.org, joi+watch-content_chromium.org, cbentzel+watch_chromium.org, vsevik, jar (doing other things), benjhayden+dwatch_chromium.org, Ilya Sherman, dyu1, dominich, benquan, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, android-webview-reviews_chromium.org, tim (not reviewing), Dane Wallinga, Raman Kakilate, creis+watch_chromium.org, rdsmith+dwatch_chromium.org, Raghu Simha, melevin, feature-media-reviews_chromium.org, oshima+watch_chromium.org, estade+watch_chromium.org, Albert Bodenhamer, haitaol1, Jered, akalin, tfarina, sreeram, yurys, Aaron Boodman, David Black, davemoore+watch_chromium.org, samarth+watch_chromium.org, kmadhusu+watch_chromium.org, pfeldman
Visibility:
Public.

Description

Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The main reasons are that it makes content's embedder interfaces harder to change if they're reused by the embedder, and that its makes it confusing for embedder code when there are multiple ways to do the same thing. BUG=227047 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192649

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Total comments: 8

Patch Set 15 : sync #

Patch Set 16 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -293 lines) Patch
M android_webview/browser/aw_browser_main_parts.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M android_webview/browser/aw_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -5 lines 0 comments Download
M android_webview/browser/aw_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +19 lines, -24 lines 0 comments Download
M android_webview/browser/net/aw_url_request_context_getter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M android_webview/lib/aw_browser_dependency_factory_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M android_webview/native/aw_quota_manager_bridge_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -8 lines 0 comments Download
M android_webview/native/state_serializer_unittests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/autofill/risk/fingerprint_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +4 lines, -12 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +30 lines, -33 lines 0 comments Download
M chrome/browser/chromeos/login/login_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/devtools/devtools_sanity_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/download/download_query.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/media/media_stream_capture_indicator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/metrics/metrics_log.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/search/local_ntp_source.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/search/local_omnibox_popup_source.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/common/chrome_content_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/chrome_content_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +14 lines, -16 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +14 lines, -7 lines 0 comments Download
M chrome/renderer/net/net_error_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -1 line 0 comments Download
M chrome/renderer/page_load_histograms.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +9 lines, -9 lines 0 comments Download
M chrome/renderer/plugins/plugin_placeholder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -5 lines 0 comments Download
M chrome/test/base/chrome_render_view_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M chrome/test/base/chrome_test_suite.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/test/base/in_process_browser_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/test/net/fake_external_tab.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M components/autofill/browser/android/personal_data_manager_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -9 lines 0 comments Download
M components/autofill/browser/autocheckout_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -8 lines 0 comments Download
M components/autofill/browser/risk/fingerprint.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download
M components/autofill/browser/risk/fingerprint.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +11 lines, -6 lines 0 comments Download
M content/browser/child_process_security_policy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/devtools/devtools_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/download/drag_download_file_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -6 lines 0 comments Download
M content/browser/loader/resource_loader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +3 lines, -8 lines 0 comments Download
M content/browser/site_instance_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/webui/web_ui_data_source_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +1 line, -7 lines 0 comments Download
M content/browser/worker_host/test/worker_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -3 lines 0 comments Download
M content/public/common/content_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +13 lines, -4 lines 0 comments Download
M content/public/common/content_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +23 lines, -0 lines 0 comments Download
M content/public/test/render_view_fake_resources_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M content/public/test/render_view_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -2 lines 0 comments Download
M content/public/test/test_content_client_initializer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -3 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M content/renderer/pepper/pepper_file_chooser_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +1 line, -7 lines 0 comments Download
M content/shell/android/shell_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M content/shell/shell_application_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M content/shell/shell_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -0 lines 0 comments Download
M content/shell/shell_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +9 lines, -0 lines 0 comments Download
M content/shell/shell_content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M content/shell/shell_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +11 lines, -0 lines 0 comments Download
M content/shell/shell_devtools_frontend.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -5 lines 0 comments Download
M content/shell/shell_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M content/shell/shell_render_process_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -4 lines 0 comments Download
M content/shell/shell_web_contents_view_delegate_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M content/shell/shell_web_contents_view_delegate_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M content/shell/shell_web_contents_view_delegate_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M content/shell/webkit_test_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -3 lines 0 comments Download
M content/test/content_browser_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +3 lines, -8 lines 0 comments Download
M content/test/content_test_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -3 lines 0 comments Download
M content/test/webrtc_audio_device_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
jam
7 years, 8 months ago (2013-04-03 22:05:23 UTC) #1
jam
joth: src\android_webview isherman: src\components\autofill
7 years, 8 months ago (2013-04-03 22:11:38 UTC) #2
Ilya Sherman
Hmm, I'm looking at three different files: metrics_log.cc, autofill_country.cc, and fingerprint.cc. Each of these had ...
7 years, 8 months ago (2013-04-03 22:54:22 UTC) #3
jam
On 2013/04/03 22:54:22, Ilya Sherman wrote: > Hmm, I'm looking at three different files: metrics_log.cc, ...
7 years, 8 months ago (2013-04-03 23:06:32 UTC) #4
brettw
lgtm https://codereview.chromium.org/13409003/diff/121001/content/shell/shell_content_renderer_client.cc File content/shell/shell_content_renderer_client.cc (right): https://codereview.chromium.org/13409003/diff/121001/content/shell/shell_content_renderer_client.cc#newcode45 content/shell/shell_content_renderer_client.cc:45: namespace { Nit: blank line after this.
7 years, 8 months ago (2013-04-03 23:40:26 UTC) #5
joth
lgtm / one suggestion. https://codereview.chromium.org/13409003/diff/121001/android_webview/browser/aw_content_browser_client.cc File android_webview/browser/aw_content_browser_client.cc (right): https://codereview.chromium.org/13409003/diff/121001/android_webview/browser/aw_content_browser_client.cc#newcode32 android_webview/browser/aw_content_browser_client.cc:32: AwBrowserContext* g_browser_context; Rather than stash ...
7 years, 8 months ago (2013-04-03 23:43:43 UTC) #6
Ilya Sherman
https://codereview.chromium.org/13409003/diff/121001/components/autofill/browser/autofill_country.cc File components/autofill/browser/autofill_country.cc (right): https://codereview.chromium.org/13409003/diff/121001/components/autofill/browser/autofill_country.cc#newcode677 components/autofill/browser/autofill_country.cc:677: application_locale_ = base::i18n::GetConfiguredLocale(); Can you use g_browser_process->GetApplicationLocale() here? https://codereview.chromium.org/13409003/diff/121001/components/autofill/browser/risk/fingerprint.cc ...
7 years, 8 months ago (2013-04-03 23:51:18 UTC) #7
jam
https://codereview.chromium.org/13409003/diff/121001/components/autofill/browser/autofill_country.cc File components/autofill/browser/autofill_country.cc (right): https://codereview.chromium.org/13409003/diff/121001/components/autofill/browser/autofill_country.cc#newcode677 components/autofill/browser/autofill_country.cc:677: application_locale_ = base::i18n::GetConfiguredLocale(); On 2013/04/03 23:51:18, Ilya Sherman wrote: ...
7 years, 8 months ago (2013-04-04 02:45:14 UTC) #8
jam
https://codereview.chromium.org/13409003/diff/121001/android_webview/browser/aw_content_browser_client.cc File android_webview/browser/aw_content_browser_client.cc (right): https://codereview.chromium.org/13409003/diff/121001/android_webview/browser/aw_content_browser_client.cc#newcode32 android_webview/browser/aw_content_browser_client.cc:32: AwBrowserContext* g_browser_context; On 2013/04/03 23:43:44, joth wrote: > Rather ...
7 years, 8 months ago (2013-04-04 02:46:09 UTC) #9
Ilya Sherman
LGTM https://codereview.chromium.org/13409003/diff/121001/components/autofill/browser/autofill_country.cc File components/autofill/browser/autofill_country.cc (right): https://codereview.chromium.org/13409003/diff/121001/components/autofill/browser/autofill_country.cc#newcode677 components/autofill/browser/autofill_country.cc:677: application_locale_ = base::i18n::GetConfiguredLocale(); On 2013/04/04 02:45:15, jam wrote: ...
7 years, 8 months ago (2013-04-04 04:05:35 UTC) #10
jam
7 years, 8 months ago (2013-04-04 17:58:35 UTC) #11
https://codereview.chromium.org/13409003/diff/121001/components/autofill/brow...
File components/autofill/browser/autofill_country.cc (right):

https://codereview.chromium.org/13409003/diff/121001/components/autofill/brow...
components/autofill/browser/autofill_country.cc:677: application_locale_ =
base::i18n::GetConfiguredLocale();
On 2013/04/04 04:05:36, Ilya Sherman wrote:
> On 2013/04/04 02:45:15, jam wrote:
> > On 2013/04/03 23:51:18, Ilya Sherman wrote:
> > > Can you use g_browser_process->GetApplicationLocale() here?
> > 
> > no, since src\components can't depend on src\chrome.
> 
> Ah, right, we've been componentized.  *sigh*
> 
> > https://codereview.chromium.org/13488009/ removes these uses, but I can't
> figure
> > out how to remove the use in address.cc. either Get/SetRawInfo need to take
a
> > locale, or perhaps the locale should just be stored on these classes instead
> of
> > passing it through all these different locations?
> 
> We can discuss this more on the other CL, but the short answer is that the
TODO
> in Address::SetRawInfo() should be fixed, i.e. we shouldn't try to fix up data
> being saved via SetRawInfo().  This requires careful changes to the Sync code,
> though, which is why it's still a TODO, rather than a TO-DONE.

are you planning on fixing this soon? I had looked through this and seeing sync
code, didn't feel like touching that code as I'm not familiar with it.

The problem is if we leave AutofillCountry::ApplicationLocale cache behind then
it will be used by other places. we can change the call sites in address.cc to
go to ICU directly, however that has the tradeoff that it'll be the only code
that will call to ICU to get the default language, and that seems like a pattern
that we don't want to spread as well.

Powered by Google App Engine
This is Rietveld 408576698