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

Issue 2010001: Refactor WifiNetwork, CellularNetwork, and EthernetNetwork into classes to ma... (Closed)

Created:
10 years, 7 months ago by Charlie Lee
Modified:
9 years, 7 months ago
Reviewers:
Nikita (slow), sky
CC:
chromium-reviews, Paweł Hajdan Jr., nkostylev+cc_chromium.org, davemoore+watch_chromium.org, ben+cc_chromium.org, tfarina (gmail-do not use)
Visibility:
Public.

Description

Refactor WifiNetwork, CellularNetwork, and EthernetNetwork into classes to make the code cleaner. BUG=none TEST=ran browser tests and also manually made sure everything still works. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=46598

Patch Set 1 #

Total comments: 13

Patch Set 2 : '' #

Total comments: 14

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -281 lines) Patch
M chrome/browser/chromeos/cros/mock_network_library.h View 1 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/cros/network_library.h View 1 2 6 chunks +128 lines, -110 lines 0 comments Download
M chrome/browser/chromeos/cros/network_library.cc View 1 2 9 chunks +92 lines, -91 lines 0 comments Download
M chrome/browser/chromeos/login/network_screen.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/network_screen_browsertest.cc View 1 10 chunks +21 lines, -21 lines 0 comments Download
M chrome/browser/chromeos/network_list.cc View 1 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/options/internet_page_view.cc View 1 2 9 chunks +18 lines, -18 lines 0 comments Download
M chrome/browser/chromeos/options/network_config_view.cc View 1 2 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/options/wifi_config_view.cc View 1 2 7 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/chromeos/options/wifi_config_view_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/status/network_menu_button.cc View 1 5 chunks +10 lines, -10 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Charlie Lee
Scott, can you take a look. Let me know if the class implementation in the ...
10 years, 7 months ago (2010-05-05 23:25:43 UTC) #1
sky
http://codereview.chromium.org/2010001/diff/1/10 File chrome/browser/chromeos/cros/network_library.cc (right): http://codereview.chromium.org/2010001/diff/1/10#newcode238 chrome/browser/chromeos/cros/network_library.cc:238: if (service.type == TYPE_ETHERNET) { The new code is ...
10 years, 7 months ago (2010-05-05 23:44:33 UTC) #2
Charlie Lee
http://codereview.chromium.org/2010001/diff/1/11 File chrome/browser/chromeos/cros/network_library.h (right): http://codereview.chromium.org/2010001/diff/1/11#newcode22 chrome/browser/chromeos/cros/network_library.h:22: protected: On 2010/05/05 23:44:33, sky wrote: > Style guide ...
10 years, 7 months ago (2010-05-06 00:00:59 UTC) #3
sky
LGTM
10 years, 7 months ago (2010-05-06 00:03:25 UTC) #4
Nikita (slow)
Great, I hope at some point we'll refactor how network list is represented in NetworkMenuButton ...
10 years, 7 months ago (2010-05-06 13:40:34 UTC) #5
Charlie Lee
Yes. I looked at it but it was too hard to do that also in ...
10 years, 7 months ago (2010-05-06 16:01:31 UTC) #6
tfarina (gmail-do not use)
On 2010/05/06 16:01:31, chocobo wrote: > Yes. I looked at it but it was too ...
10 years, 7 months ago (2010-05-06 16:21:07 UTC) #7
Charlie Lee
10 years, 7 months ago (2010-05-06 17:48:17 UTC) #8
http://codereview.chromium.org/2010001/diff/16001/17009
File chrome/browser/chromeos/cros/network_library.cc (right):

http://codereview.chromium.org/2010001/diff/16001/17009#newcode303
chrome/browser/chromeos/cros/network_library.cc:303: if (service.type ==
TYPE_ETHERNET) {
On 2010/05/06 16:21:07, tfarina wrote:
> nit: I'd prefer to not have {} around single line if statements.

Done.

http://codereview.chromium.org/2010001/diff/16001/17010
File chrome/browser/chromeos/cros/network_library.h (right):

http://codereview.chromium.org/2010001/diff/16001/17010#newcode1
chrome/browser/chromeos/cros/network_library.h:1: // Copyright (c) 2009 The
Chromium Authors. All rights reserved.
On 2010/05/06 16:21:07, tfarina wrote:
> nit: 2010

Done.

http://codereview.chromium.org/2010001/diff/16001/17010#newcode51
chrome/browser/chromeos/cros/network_library.h:51: };
This is actually copied. I plan to refactor it to not do any copying. Once
that's done, I will add the DISALLOW_COPY_AND_ASSIGN.

On 2010/05/06 16:21:07, tfarina wrote:
> Is this class and the others below allowed to be copied and assigned (I didn't
> search), otherwise DISALLOW_COPY_AND_ASSIGN?

http://codereview.chromium.org/2010001/diff/16001/17010#newcode361
chrome/browser/chromeos/cros/network_library.h:361: return available_devices_ &
(1 << TYPE_ETHERNET); }
On 2010/05/06 16:21:07, tfarina wrote:
> nit: I'd like to put the } into the following line, below too. But is up to
you.

Done.

http://codereview.chromium.org/2010001/diff/16001/17006
File chrome/browser/chromeos/options/internet_page_view.cc (right):

http://codereview.chromium.org/2010001/diff/16001/17006#newcode1
chrome/browser/chromeos/options/internet_page_view.cc:1: // Copyright (c) 2009
The Chromium Authors. All rights reserved.
On 2010/05/06 16:21:07, tfarina wrote:
> nit: 2010

Done.

http://codereview.chromium.org/2010001/diff/16001/17004
File chrome/browser/chromeos/options/network_config_view.cc (right):

http://codereview.chromium.org/2010001/diff/16001/17004#newcode1
chrome/browser/chromeos/options/network_config_view.cc:1: // Copyright (c) 2009
The Chromium Authors. All rights reserved.
On 2010/05/06 16:21:07, tfarina wrote:
> nit: 2010

Done.

http://codereview.chromium.org/2010001/diff/16001/17005
File chrome/browser/chromeos/options/wifi_config_view.cc (right):

http://codereview.chromium.org/2010001/diff/16001/17005#newcode1
chrome/browser/chromeos/options/wifi_config_view.cc:1: // Copyright (c) 2009 The
Chromium Authors. All rights reserved.
On 2010/05/06 16:21:07, tfarina wrote:
> nit: 2010

Done.

Powered by Google App Engine
This is Rietveld 408576698