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

Side by Side Diff: chrome/browser/chromeos/cros/network_library.cc

Issue 6027012: Fix so that login errors are shown from login/oobe screens.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/background_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/cros/network_library.h" 5 #include "chrome/browser/chromeos/cros/network_library.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
11 #include "base/i18n/time_formatting.h" 11 #include "base/i18n/time_formatting.h"
12 #include "base/stl_util-inl.h" 12 #include "base/stl_util-inl.h"
13 #include "base/string_number_conversions.h" 13 #include "base/string_number_conversions.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/browser/browser_thread.h" 17 #include "chrome/browser/browser_thread.h"
18 #include "chrome/browser/chromeos/network_login_observer.h"
18 #include "chrome/browser/chromeos/cros/cros_library.h" 19 #include "chrome/browser/chromeos/cros/cros_library.h"
19 #include "chrome/browser/chromeos/login/user_manager.h" 20 #include "chrome/browser/chromeos/login/user_manager.h"
20 #include "chrome/common/time_format.h" 21 #include "chrome/common/time_format.h"
21 #include "grit/generated_resources.h" 22 #include "grit/generated_resources.h"
22 23
23 namespace { 24 namespace {
24 25
25 // FlimFlam may send multiple notifications for single network change. 26 // FlimFlam may send multiple notifications for single network change.
26 // We wait small amount of time before retrieving the status to 27 // We wait small amount of time before retrieving the status to
27 // avoid send multiple sync request to flim flam. 28 // avoid send multiple sync request to flim flam.
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 wifi_scanning_(false), 840 wifi_scanning_(false),
840 offline_mode_(false), 841 offline_mode_(false),
841 update_task_(NULL) { 842 update_task_(NULL) {
842 if (EnsureCrosLoaded()) { 843 if (EnsureCrosLoaded()) {
843 Init(); 844 Init();
844 network_manager_monitor_ = 845 network_manager_monitor_ =
845 MonitorNetworkManager(&NetworkManagerStatusChangedHandler, 846 MonitorNetworkManager(&NetworkManagerStatusChangedHandler,
846 this); 847 this);
847 data_plan_monitor_ = MonitorCellularDataPlan(&DataPlanUpdateHandler, 848 data_plan_monitor_ = MonitorCellularDataPlan(&DataPlanUpdateHandler,
848 this); 849 this);
850 network_login_observer_.reset(new NetworkLoginObserver(this));
849 } else { 851 } else {
850 InitTestData(); 852 InitTestData();
851 } 853 }
852 } 854 }
853 855
854 ~NetworkLibraryImpl() { 856 ~NetworkLibraryImpl() {
855 network_manager_observers_.Clear(); 857 network_manager_observers_.Clear();
856 if (network_manager_monitor_) 858 if (network_manager_monitor_)
857 DisconnectPropertyChangeMonitor(network_manager_monitor_); 859 DisconnectPropertyChangeMonitor(network_manager_monitor_);
858 data_plan_observers_.Clear(); 860 data_plan_observers_.Clear();
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 1855
1854 // Network observer map 1856 // Network observer map
1855 NetworkObserverMap network_observers_; 1857 NetworkObserverMap network_observers_;
1856 1858
1857 // For monitoring network manager status changes. 1859 // For monitoring network manager status changes.
1858 PropertyChangeMonitor network_manager_monitor_; 1860 PropertyChangeMonitor network_manager_monitor_;
1859 1861
1860 // For monitoring data plan changes to the connected cellular network. 1862 // For monitoring data plan changes to the connected cellular network.
1861 DataPlanUpdateMonitor data_plan_monitor_; 1863 DataPlanUpdateMonitor data_plan_monitor_;
1862 1864
1865 // Network login observer.
1866 scoped_ptr<NetworkLoginObserver> network_login_observer_;
1867
1863 // The ethernet network. 1868 // The ethernet network.
1864 EthernetNetwork* ethernet_; 1869 EthernetNetwork* ethernet_;
1865 1870
1866 // The list of available wifi networks. 1871 // The list of available wifi networks.
1867 WifiNetworkVector wifi_networks_; 1872 WifiNetworkVector wifi_networks_;
1868 1873
1869 // The current connected (or connecting) wifi network. 1874 // The current connected (or connecting) wifi network.
1870 WifiNetwork* wifi_; 1875 WifiNetwork* wifi_;
1871 1876
1872 // The remembered wifi networks. 1877 // The remembered wifi networks.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 return new NetworkLibraryStubImpl(); 2023 return new NetworkLibraryStubImpl();
2019 else 2024 else
2020 return new NetworkLibraryImpl(); 2025 return new NetworkLibraryImpl();
2021 } 2026 }
2022 2027
2023 } // namespace chromeos 2028 } // namespace chromeos
2024 2029
2025 // Allows InvokeLater without adding refcounting. This class is a Singleton and 2030 // Allows InvokeLater without adding refcounting. This class is a Singleton and
2026 // won't be deleted until it's last InvokeLater is run. 2031 // won't be deleted until it's last InvokeLater is run.
2027 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImpl); 2032 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImpl);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/background_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698