New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 674033 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , iOS
Pri: 3
Type: Feature



Sign in to add a comment

Avoid nested complex MakeUnique calls in service factories.

Project Member Reported by vitaliii@chromium.org, Dec 14 2016

Issue description

Currently both ios and non ios factories use nested MakeUnique, which are tricky to parse (it is not immediately clear which arguments belong to the outer MakeUnique and which to the inner one).
 
Labels: zine-17-01-30
Owner: vitaliii@chromium.org
Status: Started
Labels: zine-17-02-06
In the end we decided to move out RemoteSuggestionsFetcher, but leave everything else there.
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a842fb2c97ce7c2e140a2d77d503c1dc6e1a299

commit 5a842fb2c97ce7c2e140a2d77d503c1dc6e1a299
Author: vitaliii <vitaliii@chromium.org>
Date: Wed Feb 08 14:50:50 2017

[NTP::Cleanup] Avoid nested complex function calls

The RemoteSuggestionsProviderImpl constructor takes a long list of parameters and previously the RemoteSuggestionFetcher (which also takes a lot of parameters) was constructed in line. This was confusing, because one could not easily determine to which MakeUnique given argument belonged to.
This CL moves the RemoteSuggestionsFetcher into a local variable to improve readability.

BUG= 674033 

Review-Url: https://codereview.chromium.org/2671453003
Cr-Commit-Position: refs/heads/master@{#448992}

[modify] https://crrev.com/5a842fb2c97ce7c2e140a2d77d503c1dc6e1a299/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
[modify] https://crrev.com/5a842fb2c97ce7c2e140a2d77d503c1dc6e1a299/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc

Status: Fixed (was: Started)
Summary: Avoid nested complex MakeUnique calls in service factories. (was: Do not use nested MakeUnique in service factories.)

Sign in to add a comment