Commit 2f7820e3 authored by Allen Bauer's avatar Allen Bauer Committed by Commit Bot

Cleanup: Use single local for layout provider.

Bug: <none>
Change-Id: Idb6a8fe933c0e71ce4a02e7f4ac5de4241367725
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424832Reviewed-by: default avatarCollin Baker <collinbaker@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809798}
parent 2bd40f49
...@@ -425,6 +425,8 @@ std::unique_ptr<views::View> CollectedCookiesViews::CreateAllowedPane() { ...@@ -425,6 +425,8 @@ std::unique_ptr<views::View> CollectedCookiesViews::CreateAllowedPane() {
content_settings::PageSpecificContentSettings::GetForFrame( content_settings::PageSpecificContentSettings::GetForFrame(
web_contents_->GetMainFrame()); web_contents_->GetMainFrame());
ChromeLayoutProvider* layout_provider = ChromeLayoutProvider::Get();
// Create the controls that go into the pane. // Create the controls that go into the pane.
auto allowed_label = std::make_unique<views::Label>( auto allowed_label = std::make_unique<views::Label>(
l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL), l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL),
...@@ -451,10 +453,9 @@ std::unique_ptr<views::View> CollectedCookiesViews::CreateAllowedPane() { ...@@ -451,10 +453,9 @@ std::unique_ptr<views::View> CollectedCookiesViews::CreateAllowedPane() {
views::GridLayout* layout = views::GridLayout* layout =
pane->SetLayoutManager(std::make_unique<views::GridLayout>()); pane->SetLayoutManager(std::make_unique<views::GridLayout>());
pane->SetBorder( pane->SetBorder(views::CreateEmptyBorder(
views::CreateEmptyBorder(ChromeLayoutProvider::Get()->GetInsetsMetric( layout_provider->GetInsetsMetric(views::INSETS_DIALOG_SUBSECTION)));
views::INSETS_DIALOG_SUBSECTION))); const int vertical_distance = layout_provider->GetDistanceMetric(
const int vertical_distance = ChromeLayoutProvider::Get()->GetDistanceMetric(
views::DISTANCE_UNRELATED_CONTROL_VERTICAL); views::DISTANCE_UNRELATED_CONTROL_VERTICAL);
const int single_column_layout_id = 0; const int single_column_layout_id = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment