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

Side by Side Diff: ash/system/chromeos/network/network_connect.cc

Issue 22611005: Switch over MobileActivator to use Network*Handler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + remove NetworkManagerChanged Created 7 years, 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ash/system/chromeos/network/network_connect.h" 5 #include "ash/system/chromeos/network/network_connect.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/chromeos/network/network_observer.h" 8 #include "ash/system/chromeos/network/network_observer.h"
9 #include "ash/system/chromeos/network/network_state_notifier.h" 9 #include "ash/system/chromeos/network/network_state_notifier.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
11 #include "ash/system/tray/system_tray_notifier.h" 11 #include "ash/system/tray/system_tray_notifier.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chromeos/login/login_state.h" 16 #include "chromeos/login/login_state.h"
17 #include "chromeos/network/device_state.h" 17 #include "chromeos/network/device_state.h"
18 #include "chromeos/network/network_activation_handler.h"
18 #include "chromeos/network/network_configuration_handler.h" 19 #include "chromeos/network/network_configuration_handler.h"
19 #include "chromeos/network/network_connection_handler.h" 20 #include "chromeos/network/network_connection_handler.h"
20 #include "chromeos/network/network_event_log.h" 21 #include "chromeos/network/network_event_log.h"
21 #include "chromeos/network/network_handler_callbacks.h" 22 #include "chromeos/network/network_handler_callbacks.h"
22 #include "chromeos/network/network_profile.h" 23 #include "chromeos/network/network_profile.h"
23 #include "chromeos/network/network_profile_handler.h" 24 #include "chromeos/network/network_profile_handler.h"
24 #include "chromeos/network/network_state.h" 25 #include "chromeos/network/network_state.h"
25 #include "chromeos/network/network_state_handler.h" 26 #include "chromeos/network/network_state_handler.h"
26 #include "grit/ash_strings.h" 27 #include "grit/ash_strings.h"
27 #include "third_party/cros_system_api/dbus/service_constants.h" 28 #include "third_party/cros_system_api/dbus/service_constants.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (!cellular->payment_url().empty()) 276 if (!cellular->payment_url().empty())
276 ash::Shell::GetInstance()->system_tray_delegate()->ShowMobileSetup( 277 ash::Shell::GetInstance()->system_tray_delegate()->ShowMobileSetup(
277 service_path); 278 service_path);
278 return; 279 return;
279 } 280 }
280 if (cellular->activation_state() == flimflam::kActivationStateActivated) { 281 if (cellular->activation_state() == flimflam::kActivationStateActivated) {
281 NET_LOG_ERROR("ActivateCellular for activated service", service_path); 282 NET_LOG_ERROR("ActivateCellular for activated service", service_path);
282 return; 283 return;
283 } 284 }
284 285
285 NetworkHandler::Get()->network_connection_handler()->ActivateNetwork( 286 NetworkHandler::Get()->network_activation_handler()->Activate(
286 service_path, 287 service_path,
287 "", // carrier 288 "", // carrier
288 base::Bind(&OnActivateSucceeded, service_path), 289 base::Bind(&OnActivateSucceeded, service_path),
289 base::Bind(&OnActivateFailed, service_path)); 290 base::Bind(&OnActivateFailed, service_path));
290 } 291 }
291 292
292 void ConfigureNetworkAndConnect(const std::string& service_path, 293 void ConfigureNetworkAndConnect(const std::string& service_path,
293 const base::DictionaryValue& properties, 294 const base::DictionaryValue& properties,
294 bool shared) { 295 bool shared) {
295 NET_LOG_USER("ConfigureNetworkAndConnect", service_path); 296 NET_LOG_USER("ConfigureNetworkAndConnect", service_path);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 if (StringToLowerASCII(error) == 391 if (StringToLowerASCII(error) ==
391 StringToLowerASCII(std::string(flimflam::kUnknownString))) { 392 StringToLowerASCII(std::string(flimflam::kUnknownString))) {
392 return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_UNKNOWN); 393 return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_UNKNOWN);
393 } 394 }
394 return l10n_util::GetStringFUTF16(IDS_NETWORK_UNRECOGNIZED_ERROR, 395 return l10n_util::GetStringFUTF16(IDS_NETWORK_UNRECOGNIZED_ERROR,
395 UTF8ToUTF16(error)); 396 UTF8ToUTF16(error));
396 } 397 }
397 398
398 } // network_connect 399 } // network_connect
399 } // ash 400 } // ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/mobile/mobile_activator.h » ('j') | chrome/browser/chromeos/mobile/mobile_activator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698