From 907fe612f5949ef8a6c2fe3bd00ddd1c423f9f20 Mon Sep 17 00:00:00 2001 From: mpearson Date: Tue, 14 Apr 2015 15:57:02 -0700 Subject: Revert of Use networkingPrivate.startConnect (patchset #12 id:240001 of https://codereview.chromium.org/1043343002/) Reason for revert: Causes browser_test failure on Win7 bot. https://build.chromium.org/p/chromium.win/builders/Win%207%20Tests%20x64%20(1) [ RUN ] WebNavigationApiTest.Failures [4444:4508:0414/144708:WARNING:data_reduction_proxy_config.cc(319)] SPDY proxy OFF at startup [4444:2028:0414/144708:ERROR:bluetooth_adapter_win.cc(102)] NOT IMPLEMENTED [180:3848:0414/144709:WARNING:raw_channel_win.cc(473)] WriteFile: Error (0x5) while retrieving error. (0xE8) [180:3848:0414/144709:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 2147483650, remote ID 3) [180:3848:0414/144709:WARNING:channel.cc(315)] RawChannel write error [180:3848:0414/144709:WARNING:raw_channel_win.cc(473)] WriteFile: Error (0x3B01) while retrieving error. (0xE8) [180:3848:0414/144709:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 1, remote ID 1) [180:3848:0414/144709:WARNING:channel.cc(315)] RawChannel write error [4444:2028:0414/144709:INFO:CONSOLE(0)] "[SUCCESS] nonExistentIframe", source: chrome-extension://ollhgkgdokpphndfogkepkmblokamlkf/test_failures.html (0) [4444:2028:0414/144710:INFO:CONSOLE(0)] "[SUCCESS] nonExistentIframeNavigation", source: chrome-extension://ollhgkgdokpphndfogkepkmblokamlkf/test_failures.html (0) [4444:2028:0414/144710:INFO:CONSOLE(0)] "[FAIL] cancel: Received unexpected event 'onCompleted':{"frameId":0,"processId":0,"tabId":0,"timeStamp":0,"url":"chrome-extension://ollhgkgdokpphndfogkepkmblokamlkf/e.html"} Error at captureEvent (chrome-extension://ollhgkgdokpphndfogkepkmblokamlkf/framework.js:194:17) at chrome-extension://ollhgkgdokpphndfogkepkmblokamlkf/framework.js:219:5 at EventImpl.dispatchToListener (extensions::event_bindings:395:22) at Event.publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:94:26) at EventImpl.dispatch_ (extensions::event_bindings:379:35) at dispatchArgs (extensions::event_bindings:247:26) at dispatchEvent (extensions::event_bindings:256:7)", source: chrome-extension://ollhgkgdokpphndfogkepkmblokamlkf/test_failures.html (0) [4444:2028:0414/144710:INFO:CONSOLE(0)] "[SUCCESS] nonExistent", source: chrome-extension://ollhgkgdokpphndfogkepkmblokamlkf/test_failures.html (0) c:\b\build\slave\win_x64_builder\build\src\chrome\browser\extensions\api\web_navigation\web_navigation_apitest.cc(468): error: Value of: RunExtensionTest("webnavigation/failures") Actual: false Expected: true Failed 1 of 4 tests [4444:2028:0414/144710:ERROR:browser_thread.h(263)] DeleteSoon failed on thread 0 [ FAILED ] WebNavigationApiTest.Failures, where TypeParam = and GetParam() = (2465 ms) Original issue's description: > Use networkingPrivate.startConnect > > This adds checks for unconfigured or non-activated networks to internet_details.js since it no longer uses the checks in network_connect.cc. > It also moves some notification handling from network_connect.cc to network_state_notifier.cc so that it does not rely on network_connect.cc. > > BUG=430115 > > Committed: https://crrev.com/e22e5bcbad2cea941993b32e6cc3b082822a42fc > Cr-Commit-Position: refs/heads/master@{#325108} TBR=armansito@chromium.org,michaelpg@chromium.org,pneubeck@chromium.org,stevenjb@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=430115 Review URL: https://codereview.chromium.org/1085993002 Cr-Commit-Position: refs/heads/master@{#325145} --- chromeos/dbus/fake_shill_service_client.cc | 34 ++++++++++++++++-------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'chromeos/dbus') diff --git a/chromeos/dbus/fake_shill_service_client.cc b/chromeos/dbus/fake_shill_service_client.cc index fdae9db..d4e789c3 100644 --- a/chromeos/dbus/fake_shill_service_client.cc +++ b/chromeos/dbus/fake_shill_service_client.cc @@ -178,8 +178,8 @@ void FakeShillServiceClient::Connect(const dbus::ObjectPath& service_path, const ErrorCallback& error_callback) { VLOG(1) << "FakeShillServiceClient::Connect: " << service_path.value(); base::DictionaryValue* service_properties = NULL; - if (!stub_services_.GetDictionary(service_path.value(), - &service_properties)) { + if (!stub_services_.GetDictionary( + service_path.value(), &service_properties)) { LOG(ERROR) << "Service not found: " << service_path.value(); error_callback.Run("Error.InvalidService", "Invalid Service"); return; @@ -190,22 +190,21 @@ void FakeShillServiceClient::Connect(const dbus::ObjectPath& service_path, // sending an update. SetOtherServicesOffline(service_path.value()); - // Clear Error. - service_properties->SetStringWithoutPathExpansion(shill::kErrorProperty, ""); - // Set Associating. base::StringValue associating_value(shill::kStateAssociation); - SetServiceProperty(service_path.value(), shill::kStateProperty, + SetServiceProperty(service_path.value(), + shill::kStateProperty, associating_value); // Stay Associating until the state is changed again after a delay. base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&FakeShillServiceClient::ContinueConnect, - weak_ptr_factory_.GetWeakPtr(), service_path.value()), + weak_ptr_factory_.GetWeakPtr(), + service_path.value()), base::TimeDelta::FromSeconds(GetInteractiveDelay())); - base::MessageLoop::current()->PostTask(FROM_HERE, callback); + callback.Run(); } void FakeShillServiceClient::Disconnect(const dbus::ObjectPath& service_path, @@ -607,7 +606,8 @@ void FakeShillServiceClient::SetCellularActivated( error_callback); } -void FakeShillServiceClient::ContinueConnect(const std::string& service_path) { +void FakeShillServiceClient::ContinueConnect( + const std::string& service_path) { VLOG(1) << "FakeShillServiceClient::ContinueConnect: " << service_path; base::DictionaryValue* service_properties = NULL; if (!stub_services_.GetDictionary(service_path, &service_properties)) { @@ -625,24 +625,26 @@ void FakeShillServiceClient::ContinueConnect(const std::string& service_path) { // No custom connect behavior set, continue with the default connect behavior. std::string passphrase; - service_properties->GetStringWithoutPathExpansion(shill::kPassphraseProperty, - &passphrase); + service_properties->GetStringWithoutPathExpansion( + shill::kPassphraseProperty, &passphrase); if (passphrase == "failure") { // Simulate a password failure. - SetServiceProperty(service_path, shill::kErrorProperty, - base::StringValue(shill::kErrorBadPassphrase)); - SetServiceProperty(service_path, shill::kStateProperty, + SetServiceProperty(service_path, + shill::kStateProperty, base::StringValue(shill::kStateFailure)); base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind( base::IgnoreResult(&FakeShillServiceClient::SetServiceProperty), - weak_ptr_factory_.GetWeakPtr(), service_path, shill::kErrorProperty, + weak_ptr_factory_.GetWeakPtr(), + service_path, + shill::kErrorProperty, base::StringValue(shill::kErrorBadPassphrase))); } else { // Set Online. VLOG(1) << "Setting state to Online " << service_path; - SetServiceProperty(service_path, shill::kStateProperty, + SetServiceProperty(service_path, + shill::kStateProperty, base::StringValue(shill::kStateOnline)); } } -- cgit v1.1