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

Unified Diff: chrome/browser/chromeos/options/internet_page_view.cc

Issue 1142005: Mocks for all libcros elements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/network_list.cc ('k') | chrome/browser/chromeos/options/ip_config_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/options/internet_page_view.cc
===================================================================
--- chrome/browser/chromeos/options/internet_page_view.cc (revision 42341)
+++ chrome/browser/chromeos/options/internet_page_view.cc (working copy)
@@ -7,6 +7,7 @@
#include <string>
#include "app/combobox_model.h"
+#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/cros/network_library.h"
#include "chrome/browser/chromeos/options/network_config_view.h"
#include "chrome/browser/chromeos/status/network_menu_button.h"
@@ -52,7 +53,8 @@
class WifiNetworkComboModel : public ComboboxModel {
public:
WifiNetworkComboModel() {
- wifi_networks_ = NetworkLibrary::Get()->wifi_networks();
+ wifi_networks_ =
+ CrosLibrary::Get()->GetNetworkLibrary()->wifi_networks();
}
virtual int GetItemCount() {
@@ -124,11 +126,11 @@
: SettingsPageSection(profile, IDS_OPTIONS_SETTINGS_SECTION_TITLE_NETWORK),
wifi_ssid_combobox_(NULL),
last_selected_wifi_ssid_index_(0) {
- NetworkLibrary::Get()->AddObserver(this);
+ CrosLibrary::Get()->GetNetworkLibrary()->AddObserver(this);
}
NetworkSection::~NetworkSection() {
- NetworkLibrary::Get()->RemoveObserver(this);
+ CrosLibrary::Get()->GetNetworkLibrary()->RemoveObserver(this);
}
void NetworkSection::ItemChanged(views::Combobox* sender,
@@ -161,8 +163,9 @@
window->Show();
view->SetLoginTextfieldFocus();
} else {
- NetworkLibrary::Get()->ConnectToWifiNetwork(activated_wifi_network_,
- string16());
+ CrosLibrary::Get()->GetNetworkLibrary()->ConnectToWifiNetwork(
+ activated_wifi_network_,
+ string16());
}
}
@@ -170,7 +173,8 @@
const views::Event& event) {
if (sender == ethernet_options_button_) {
NetworkConfigView* view =
- new NetworkConfigView(NetworkLibrary::Get()->ethernet_network());
+ new NetworkConfigView(
+ CrosLibrary::Get()->GetNetworkLibrary()->ethernet_network());
views::Window* window = views::Window::CreateChromeWindow(
NULL, gfx::Rect(), view);
window->SetIsAlwaysOnTop(true);
@@ -349,7 +353,7 @@
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
// Call NetworkChanged to set initial values.
- NetworkChanged(NetworkLibrary::Get());
+ NetworkChanged(CrosLibrary::Get()->GetNetworkLibrary());
}
void NetworkSection::SelectWifi(const std::string& wifi_ssid) {
« no previous file with comments | « chrome/browser/chromeos/network_list.cc ('k') | chrome/browser/chromeos/options/ip_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698