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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/network_state_informer.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/chromeos/login/network_state_informer.h" 5 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 16 matching lines...) Expand all
27 const char kNetworkStateCaptivePortal[] = "behind captive portal"; 27 const char kNetworkStateCaptivePortal[] = "behind captive portal";
28 const char kNetworkStateConnecting[] = "connecting"; 28 const char kNetworkStateConnecting[] = "connecting";
29 const char kNetworkStateProxyAuthRequired[] = "proxy auth required"; 29 const char kNetworkStateProxyAuthRequired[] = "proxy auth required";
30 30
31 bool HasDefaultNetworkProxyConfigured() { 31 bool HasDefaultNetworkProxyConfigured() {
32 const NetworkState* network = 32 const NetworkState* network =
33 NetworkHandler::Get()->network_state_handler()->DefaultNetwork(); 33 NetworkHandler::Get()->network_state_handler()->DefaultNetwork();
34 if (!network) 34 if (!network)
35 return false; 35 return false;
36 onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; 36 onc::ONCSource onc_source = onc::ONC_SOURCE_NONE;
37 scoped_ptr<ProxyConfigDictionary> proxy_dict = 37 std::unique_ptr<ProxyConfigDictionary> proxy_dict =
38 proxy_config::GetProxyConfigForNetwork( 38 proxy_config::GetProxyConfigForNetwork(
39 NULL, g_browser_process->local_state(), *network, &onc_source); 39 NULL, g_browser_process->local_state(), *network, &onc_source);
40 ProxyPrefs::ProxyMode mode; 40 ProxyPrefs::ProxyMode mode;
41 return (proxy_dict && proxy_dict->GetMode(&mode) && 41 return (proxy_dict && proxy_dict->GetMode(&mode) &&
42 mode == ProxyPrefs::MODE_FIXED_SERVERS); 42 mode == ProxyPrefs::MODE_FIXED_SERVERS);
43 } 43 }
44 44
45 NetworkStateInformer::State GetStateForDefaultNetwork() { 45 NetworkStateInformer::State GetStateForDefaultNetwork() {
46 const NetworkState* network = 46 const NetworkState* network =
47 NetworkHandler::Get()->network_state_handler()->DefaultNetwork(); 47 NetworkHandler::Get()->network_state_handler()->DefaultNetwork();
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 SendStateToObservers(NetworkError::ERROR_REASON_UPDATE); 203 SendStateToObservers(NetworkError::ERROR_REASON_UPDATE);
204 } 204 }
205 205
206 void NetworkStateInformer::SendStateToObservers( 206 void NetworkStateInformer::SendStateToObservers(
207 NetworkError::ErrorReason reason) { 207 NetworkError::ErrorReason reason) {
208 FOR_EACH_OBSERVER(NetworkStateInformerObserver, observers_, 208 FOR_EACH_OBSERVER(NetworkStateInformerObserver, observers_,
209 UpdateState(reason)); 209 UpdateState(reason));
210 } 210 }
211 211
212 } // namespace chromeos 212 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc ('k') | chrome/browser/ui/webui/chromeos/login/oobe_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698