Chromium Code Reviews

Issue 4324001: Add proxy settings to network control at upper row of controls at login screen. (Closed)

Created:
10 years, 1 month ago by Denis Lagno
Modified:
9 years, 6 months ago
Reviewers:
whywhat
CC:
chromium-reviews, nkostylev+cc_chromium.org, davemoore+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Add proxy settings to network control at upper row of controls at login screen. BUG=http://crosbug.com/8458 TEST=Manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64901

Patch Set 1 #

Patch Set 2 : fixed indentation #

Total comments: 18

Patch Set 3 : account for comments #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Stats (+126 lines, -42 lines)
M chrome/app/generated_resources.grd View 1 chunk +3 lines, -0 lines 0 comments
M chrome/browser/chromeos/frame/browser_view.h View 1 chunk +1 line, -1 line 0 comments
M chrome/browser/chromeos/frame/browser_view.cc View 1 chunk +1 line, -1 line 0 comments
M chrome/browser/chromeos/login/background_view.h View 5 chunks +11 lines, -2 lines 0 comments
M chrome/browser/chromeos/login/background_view.cc View 3 chunks +19 lines, -4 lines 0 comments
M chrome/browser/chromeos/login/network_selection_view.cc View 3 chunks +3 lines, -26 lines 0 comments
A chrome/browser/chromeos/login/proxy_settings_dialog.h View 1 chunk +25 lines, -0 lines 0 comments
A chrome/browser/chromeos/login/proxy_settings_dialog.cc View 1 chunk +48 lines, -0 lines 0 comments
M chrome/browser/chromeos/status/network_dropdown_button.h View 1 chunk +2 lines, -2 lines 0 comments
M chrome/browser/chromeos/status/network_menu.h View 1 chunk +1 line, -1 line 0 comments
M chrome/browser/chromeos/status/network_menu.cc View 1 chunk +7 lines, -2 lines 0 comments
M chrome/browser/chromeos/status/network_menu_button.h View 1 chunk +1 line, -1 line 0 comments
M chrome/browser/chromeos/status/network_menu_button.cc View 1 chunk +1 line, -1 line 0 comments
M chrome/browser/chromeos/status/status_area_host.h View 1 chunk +1 line, -1 line 0 comments
M chrome/chrome_browser.gypi View 1 chunk +2 lines, -0 lines 0 comments

Messages

Total messages: 3 (0 generated)
Denis Lagno
please take a look
10 years, 1 month ago (2010-11-02 19:21:57 UTC) #1
whywhat
LGTM overall with several nits. http://codereview.chromium.org/4324001/diff/2001/3001 File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/4324001/diff/2001/3001#newcode10050 chrome/app/generated_resources.grd:10050: <message name="IDS_LOGIN_STATUSBAR_NETWORK_OPEN_OPTIONS_DIALOG" desc="The menu ...
10 years, 1 month ago (2010-11-02 19:46:45 UTC) #2
Denis Lagno
10 years, 1 month ago (2010-11-03 11:16:14 UTC) #3
http://codereview.chromium.org/4324001/diff/2001/3001
File chrome/app/generated_resources.grd (right):

http://codereview.chromium.org/4324001/diff/2001/3001#newcode10050
chrome/app/generated_resources.grd:10050: <message
name="IDS_LOGIN_STATUSBAR_NETWORK_OPEN_OPTIONS_DIALOG" desc="The menu item in
the network menu button at login screen for opening the options dialog">
On 2010/11/02 19:46:46, whywhat wrote:
> Guess it should be smth like IDS_STATUSBAR_NETWORK_OPEN_PROXY_SETTINGS_DIALOG.
> The description should tell that it's for opening proxy settings, not just
> options dialog.

Done.

http://codereview.chromium.org/4324001/diff/2001/3002
File chrome/browser/chromeos/login/background_view.cc (right):

http://codereview.chromium.org/4324001/diff/2001/3002#newcode266
chrome/browser/chromeos/login/background_view.cc:266: if (button_view ==
status_area_->network_view()) {
On 2010/11/02 19:46:46, whywhat wrote:
> I think you don't need this check, since true will be returned below.

I think eliminating this check is compiler's job.
From readability POV this check gives explicit hint that given button_view is
handled.

http://codereview.chromium.org/4324001/diff/2001/3002#newcode277
chrome/browser/chromeos/login/background_view.cc:277: void
BackgroundView::OpenButtonOptions(const views::View* button_view) const {
On 2010/11/02 19:46:46, whywhat wrote:
> Perhaps this method should not be const in the first place. You could avoid
> mutable dialog and const_cast then.
> This would require more files to be changed, but the change is trivial.

Done.

http://codereview.chromium.org/4324001/diff/2001/3002#newcode300
chrome/browser/chromeos/login/background_view.cc:300:
proxy_settings_dialog_.reset(NULL);
On 2010/11/02 19:46:46, whywhat wrote:
> I think NULL can be omitted.

Done.

http://codereview.chromium.org/4324001/diff/2001/3005
File chrome/browser/chromeos/login/proxy_settings_dialog.cc (right):

http://codereview.chromium.org/4324001/diff/2001/3005#newcode14
chrome/browser/chromeos/login/proxy_settings_dialog.cc:14: static const int
kProxySettingsDialogReasonableWidth = 750;
On 2010/11/02 19:46:46, whywhat wrote:
> You don't need static for constants in unnamed namespace.

Done.

http://codereview.chromium.org/4324001/diff/2001/3005#newcode16
chrome/browser/chromeos/login/proxy_settings_dialog.cc:16: static const int
kProxySettingsDialogReasonableWidthRatio = 0.4;
On 2010/11/02 19:46:46, whywhat wrote:
> I think these two constants should be of type double.

Done.

http://codereview.chromium.org/4324001/diff/2001/3005#newcode31
chrome/browser/chromeos/login/proxy_settings_dialog.cc:31:
GURL("chrome://settings/proxy?menu=off"),
On 2010/11/02 19:46:46, whywhat wrote:
> This should be kProxySettingsURL, right?

Done.

http://codereview.chromium.org/4324001/diff/2001/3005#newcode35
chrome/browser/chromeos/login/proxy_settings_dialog.cc:35: std::min(
On 2010/11/02 19:46:46, whywhat wrote:
> Could you add a bunch of variables here with self-descriptive names like:
> int max_width = screen_bounds.width();
> // rename to kProxySettingsDialogMinWidth?
> int min_width = kProxySettingsDialogReasonableWidth;
> int desired_width = screen_bounds.width() * k...Ratio
> int width = std::min(max_width, std::max(min_width, desired_width));
> perhaps make a helper function to use for both width and height

Done.

http://codereview.chromium.org/4324001/diff/2001/3008
File chrome/browser/chromeos/status/network_menu.cc (right):

http://codereview.chromium.org/4324001/diff/2001/3008#newcode605
chrome/browser/chromeos/status/network_menu.cc:605: IsBrowserMode() ?
On 2010/11/02 19:46:46, whywhat wrote:
> I think that using 'if' is more readable when ? : takes more than one short
> line. Could you use 'if' here?

Done.

Powered by Google App Engine