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

Side by Side Diff: components/arc/arc_bridge_service.cc

Issue 1966133002: Run RemoveArcData after a user has opted out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 7 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 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/arc_bridge_service.h" 5 #include "components/arc/arc_bridge_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 FOR_EACH_OBSERVER(Observer, observer_list(), OnWindowManagerInstanceClosed()); 494 FOR_EACH_OBSERVER(Observer, observer_list(), OnWindowManagerInstanceClosed());
495 } 495 }
496 496
497 void ArcBridgeService::SetState(State state) { 497 void ArcBridgeService::SetState(State state) {
498 DCHECK(CalledOnValidThread()); 498 DCHECK(CalledOnValidThread());
499 // DCHECK on enum classes not supported. 499 // DCHECK on enum classes not supported.
500 DCHECK(state_ != state); 500 DCHECK(state_ != state);
501 state_ = state; 501 state_ = state;
502 VLOG(2) << "State: " << static_cast<uint32_t>(state_); 502 VLOG(2) << "State: " << static_cast<uint32_t>(state_);
503 FOR_EACH_OBSERVER(Observer, observer_list(), OnStateChanged(state_)); 503 FOR_EACH_OBSERVER(Observer, observer_list(), OnStateChanged(state_));
504 if (state_ == State::READY)
505 FOR_EACH_OBSERVER(Observer, observer_list(), OnBridgeReady());
506 if (state == State::STOPPED)
Luis Héctor Chávez 2016/05/19 16:10:27 nit: else if
dspaid 2016/05/20 07:27:07 Done.
507 FOR_EACH_OBSERVER(Observer, observer_list(), OnBridgeStopped());
504 } 508 }
505 509
506 void ArcBridgeService::SetAvailable(bool available) { 510 void ArcBridgeService::SetAvailable(bool available) {
507 DCHECK(CalledOnValidThread()); 511 DCHECK(CalledOnValidThread());
508 DCHECK(available_ != available); 512 DCHECK(available_ != available);
509 available_ = available; 513 available_ = available;
510 FOR_EACH_OBSERVER(Observer, observer_list(), OnAvailableChanged(available_)); 514 FOR_EACH_OBSERVER(Observer, observer_list(), OnAvailableChanged(available_));
511 } 515 }
512 516
513 bool ArcBridgeService::CalledOnValidThread() { 517 bool ArcBridgeService::CalledOnValidThread() {
(...skipping 15 matching lines...) Expand all
529 CloseNetChannel(); 533 CloseNetChannel();
530 CloseNotificationsChannel(); 534 CloseNotificationsChannel();
531 ClosePolicyChannel(); 535 ClosePolicyChannel();
532 ClosePowerChannel(); 536 ClosePowerChannel();
533 CloseProcessChannel(); 537 CloseProcessChannel();
534 CloseVideoChannel(); 538 CloseVideoChannel();
535 CloseWindowManagerChannel(); 539 CloseWindowManagerChannel();
536 } 540 }
537 541
538 } // namespace arc 542 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698