New issue
Advanced search Search tips

Issue 753008 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Task



Sign in to add a comment

Fix net::GetEffectiveConnectionTypeForName signature to return the result

Project Member Reported by devdeepray@chromium.org, Aug 7 2017

Issue description

net::GetEffectiveConnectionTypeForName returns the result using a reference argument. This is inconvenient to use as it doesn't allow initialization of const members and needs a temporary variable to get the result. 

The correct behavior should be to return the result wrapped in base::Optional, which will make it possible to use it as net::GetEffectiveConnectionTypeForName(ect_name).value_or(default_ect).
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 10 2017

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

commit 49db72f9ef208d84df1b4f99ee76946ef0deff0c
Author: Tarun Bansal <tbansal@chromium.org>
Date: Thu Aug 10 05:19:04 2017

NQE: Update function signature to return a base::Optional value.

TBR=mmenke@chromium.org

Bug:  753008 
Change-Id: I9d776bd05a60eb731057ab39d196c58a0ab6855f
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
Reviewed-on: https://chromium-review.googlesource.com/607790
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Helen Li <xunjieli@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493256}
[modify] https://crrev.com/49db72f9ef208d84df1b4f99ee76946ef0deff0c/components/cronet/url_request_context_config.cc
[modify] https://crrev.com/49db72f9ef208d84df1b4f99ee76946ef0deff0c/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
[modify] https://crrev.com/49db72f9ef208d84df1b4f99ee76946ef0deff0c/components/previews/core/previews_experiments.cc
[modify] https://crrev.com/49db72f9ef208d84df1b4f99ee76946ef0deff0c/content/browser/loader/resource_scheduler.cc
[modify] https://crrev.com/49db72f9ef208d84df1b4f99ee76946ef0deff0c/net/nqe/effective_connection_type.cc
[modify] https://crrev.com/49db72f9ef208d84df1b4f99ee76946ef0deff0c/net/nqe/effective_connection_type.h
[modify] https://crrev.com/49db72f9ef208d84df1b4f99ee76946ef0deff0c/net/nqe/effective_connection_type_unittest.cc
[modify] https://crrev.com/49db72f9ef208d84df1b4f99ee76946ef0deff0c/net/nqe/network_qualities_prefs_manager.cc
[modify] https://crrev.com/49db72f9ef208d84df1b4f99ee76946ef0deff0c/net/nqe/network_quality_estimator_params.cc

Labels: M-62
Status: Fixed (was: Assigned)

Sign in to add a comment