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

Side by Side Diff: components/arc/net/arc_net_host_impl.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/arc/net/arc_net_host_impl.h" 5 #include "components/arc/net/arc_net_host_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 arc_bridge_service()->net()->RemoveObserver(this); 299 arc_bridge_service()->net()->RemoveObserver(this);
300 if (observing_network_state_) { 300 if (observing_network_state_) {
301 GetStateHandler()->RemoveObserver(this, FROM_HERE); 301 GetStateHandler()->RemoveObserver(this, FROM_HERE);
302 } 302 }
303 } 303 }
304 304
305 void ArcNetHostImpl::OnInstanceReady() { 305 void ArcNetHostImpl::OnInstanceReady() {
306 DCHECK(thread_checker_.CalledOnValidThread()); 306 DCHECK(thread_checker_.CalledOnValidThread());
307 307
308 mojom::NetHostPtr host; 308 mojom::NetHostPtr host;
309 binding_.Bind(GetProxy(&host)); 309 binding_.Bind(MakeRequest(&host));
310 auto* instance = arc_bridge_service()->net()->GetInstanceForMethod("Init"); 310 auto* instance = arc_bridge_service()->net()->GetInstanceForMethod("Init");
311 DCHECK(instance); 311 DCHECK(instance);
312 instance->Init(std::move(host)); 312 instance->Init(std::move(host));
313 313
314 if (chromeos::NetworkHandler::IsInitialized()) { 314 if (chromeos::NetworkHandler::IsInitialized()) {
315 GetStateHandler()->AddObserver(this, FROM_HERE); 315 GetStateHandler()->AddObserver(this, FROM_HERE);
316 observing_network_state_ = true; 316 observing_network_state_ = true;
317 } 317 }
318 } 318 }
319 319
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 net_instance->WifiEnabledStateChanged(is_enabled); 656 net_instance->WifiEnabledStateChanged(is_enabled);
657 } 657 }
658 658
659 void ArcNetHostImpl::OnShuttingDown() { 659 void ArcNetHostImpl::OnShuttingDown() {
660 DCHECK(observing_network_state_); 660 DCHECK(observing_network_state_);
661 GetStateHandler()->RemoveObserver(this, FROM_HERE); 661 GetStateHandler()->RemoveObserver(this, FROM_HERE);
662 observing_network_state_ = false; 662 observing_network_state_ = false;
663 } 663 }
664 664
665 } // namespace arc 665 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/metrics/arc_metrics_service.cc ('k') | components/autofill/content/browser/content_autofill_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698