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

Side by Side Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 7969009: Removed chromeos::NetworkStateNotifier and redirected all related code to use (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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/boot_times_loader.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/automation/automation_provider_json.h" 12 #include "chrome/browser/automation/automation_provider_json.h"
13 #include "chrome/browser/automation/automation_provider_observers.h" 13 #include "chrome/browser/automation/automation_provider_observers.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/chromeos/audio_handler.h" 15 #include "chrome/browser/chromeos/audio_handler.h"
16 #include "chrome/browser/chromeos/cros/cros_library.h" 16 #include "chrome/browser/chromeos/cros/cros_library.h"
17 #include "chrome/browser/chromeos/cros/network_library.h" 17 #include "chrome/browser/chromeos/cros/network_library.h"
18 #include "chrome/browser/chromeos/cros/power_library.h" 18 #include "chrome/browser/chromeos/cros/power_library.h"
19 #include "chrome/browser/chromeos/cros/screen_lock_library.h" 19 #include "chrome/browser/chromeos/cros/screen_lock_library.h"
20 #include "chrome/browser/chromeos/cros/update_library.h" 20 #include "chrome/browser/chromeos/cros/update_library.h"
21 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen. h" 21 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen. h"
22 #include "chrome/browser/chromeos/login/existing_user_controller.h" 22 #include "chrome/browser/chromeos/login/existing_user_controller.h"
23 #include "chrome/browser/chromeos/login/login_display.h" 23 #include "chrome/browser/chromeos/login/login_display.h"
24 #include "chrome/browser/chromeos/login/login_display_host.h" 24 #include "chrome/browser/chromeos/login/login_display_host.h"
25 #include "chrome/browser/chromeos/login/screen_locker.h" 25 #include "chrome/browser/chromeos/login/screen_locker.h"
26 #include "chrome/browser/chromeos/login/webui_login_display.h" 26 #include "chrome/browser/chromeos/login/webui_login_display.h"
27 #include "chrome/browser/chromeos/login/wizard_controller.h" 27 #include "chrome/browser/chromeos/login/wizard_controller.h"
28 #include "chrome/browser/chromeos/network_state_notifier.h"
29 #include "chrome/browser/chromeos/options/take_photo_dialog.h" 28 #include "chrome/browser/chromeos/options/take_photo_dialog.h"
30 #include "chrome/browser/chromeos/proxy_cros_settings_provider.h" 29 #include "chrome/browser/chromeos/proxy_cros_settings_provider.h"
31 #include "chrome/browser/chromeos/system/timezone_settings.h" 30 #include "chrome/browser/chromeos/system/timezone_settings.h"
32 #include "chrome/browser/policy/browser_policy_connector.h" 31 #include "chrome/browser/policy/browser_policy_connector.h"
33 #include "chrome/browser/policy/cloud_policy_cache_base.h" 32 #include "chrome/browser/policy/cloud_policy_cache_base.h"
34 #include "chrome/browser/policy/cloud_policy_data_store.h" 33 #include "chrome/browser/policy/cloud_policy_data_store.h"
35 #include "chrome/browser/policy/cloud_policy_subsystem.h" 34 #include "chrome/browser/policy/cloud_policy_subsystem.h"
36 #include "chrome/browser/policy/enterprise_install_attributes.h" 35 #include "chrome/browser/policy/enterprise_install_attributes.h"
37 #include "chrome/browser/prefs/pref_service.h" 36 #include "chrome/browser/prefs/pref_service.h"
38 #include "chrome/browser/ui/browser_window.h" 37 #include "chrome/browser/ui/browser_window.h"
39 #include "chrome/browser/ui/views/window.h" 38 #include "chrome/browser/ui/views/window.h"
40 #include "chrome/common/chrome_switches.h" 39 #include "chrome/common/chrome_switches.h"
41 #include "chrome/common/pref_names.h" 40 #include "chrome/common/pref_names.h"
41 #include "net/base/network_change_notifier.h"
42 #include "policy/policy_constants.h" 42 #include "policy/policy_constants.h"
43 #include "views/widget/widget.h" 43 #include "views/widget/widget.h"
44 44
45 using chromeos::CrosLibrary; 45 using chromeos::CrosLibrary;
46 using chromeos::NetworkLibrary; 46 using chromeos::NetworkLibrary;
47 using chromeos::UpdateLibrary; 47 using chromeos::UpdateLibrary;
48 using chromeos::UserManager; 48 using chromeos::UserManager;
49 49
50 namespace { 50 namespace {
51 51
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 368 }
369 369
370 void TestingAutomationProvider::GetNetworkInfo(DictionaryValue* args, 370 void TestingAutomationProvider::GetNetworkInfo(DictionaryValue* args,
371 IPC::Message* reply_message) { 371 IPC::Message* reply_message) {
372 if (!EnsureCrosLibraryLoaded(this, reply_message)) 372 if (!EnsureCrosLibraryLoaded(this, reply_message))
373 return; 373 return;
374 374
375 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 375 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
376 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary(); 376 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary();
377 377
378 chromeos::NetworkStateNotifier* notifier = 378 return_value->SetBoolean("offline_mode",
379 chromeos::NetworkStateNotifier::GetInstance(); 379 net::NetworkChangeNotifier::IsOffline());
380 return_value->SetBoolean("offline_mode", !notifier->is_connected());
381 380
382 // IP address. 381 // IP address.
383 return_value->SetString("ip_address", network_library->IPAddress()); 382 return_value->SetString("ip_address", network_library->IPAddress());
384 383
385 // Currently connected networks. 384 // Currently connected networks.
386 if (network_library->ethernet_network()) 385 if (network_library->ethernet_network())
387 return_value->SetString( 386 return_value->SetString(
388 "connected_ethernet", 387 "connected_ethernet",
389 network_library->ethernet_network()->service_path()); 388 network_library->ethernet_network()->service_path());
390 if (network_library->wifi_network()) 389 if (network_library->wifi_network())
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 1135
1137 // Set up an observer (it will delete itself). 1136 // Set up an observer (it will delete itself).
1138 take_photo_dialog->AddObserver(new PhotoCaptureObserver( 1137 take_photo_dialog->AddObserver(new PhotoCaptureObserver(
1139 this, reply_message)); 1138 this, reply_message));
1140 1139
1141 views::Widget* window = browser::CreateViewsWindow( 1140 views::Widget* window = browser::CreateViewsWindow(
1142 browser->window()->GetNativeHandle(), take_photo_dialog); 1141 browser->window()->GetNativeHandle(), take_photo_dialog);
1143 window->SetAlwaysOnTop(true); 1142 window->SetAlwaysOnTop(true);
1144 window->Show(); 1143 window->Show();
1145 } 1144 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/boot_times_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698