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

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: Adressed comments Created 4 years, 6 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
« no previous file with comments | « components/arc/arc_bridge_service.h ('k') | components/arc/arc_service_manager.h » ('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 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 FOR_EACH_OBSERVER(Observer, observer_list(), OnWindowManagerInstanceClosed()); 583 FOR_EACH_OBSERVER(Observer, observer_list(), OnWindowManagerInstanceClosed());
584 } 584 }
585 585
586 void ArcBridgeService::SetState(State state) { 586 void ArcBridgeService::SetState(State state) {
587 DCHECK(CalledOnValidThread()); 587 DCHECK(CalledOnValidThread());
588 // DCHECK on enum classes not supported. 588 // DCHECK on enum classes not supported.
589 DCHECK(state_ != state); 589 DCHECK(state_ != state);
590 state_ = state; 590 state_ = state;
591 VLOG(2) << "State: " << static_cast<uint32_t>(state_); 591 VLOG(2) << "State: " << static_cast<uint32_t>(state_);
592 FOR_EACH_OBSERVER(Observer, observer_list(), OnStateChanged(state_)); 592 FOR_EACH_OBSERVER(Observer, observer_list(), OnStateChanged(state_));
593 if (state_ == State::READY)
594 FOR_EACH_OBSERVER(Observer, observer_list(), OnBridgeReady());
595 else if (state == State::STOPPED)
596 FOR_EACH_OBSERVER(Observer, observer_list(), OnBridgeStopped());
593 } 597 }
594 598
595 void ArcBridgeService::SetAvailable(bool available) { 599 void ArcBridgeService::SetAvailable(bool available) {
596 DCHECK(CalledOnValidThread()); 600 DCHECK(CalledOnValidThread());
597 DCHECK(available_ != available); 601 DCHECK(available_ != available);
598 available_ = available; 602 available_ = available;
599 FOR_EACH_OBSERVER(Observer, observer_list(), OnAvailableChanged(available_)); 603 FOR_EACH_OBSERVER(Observer, observer_list(), OnAvailableChanged(available_));
600 } 604 }
601 605
602 bool ArcBridgeService::CalledOnValidThread() { 606 bool ArcBridgeService::CalledOnValidThread() {
(...skipping 18 matching lines...) Expand all
621 CloseObbMounterChannel(); 625 CloseObbMounterChannel();
622 ClosePolicyChannel(); 626 ClosePolicyChannel();
623 ClosePowerChannel(); 627 ClosePowerChannel();
624 CloseProcessChannel(); 628 CloseProcessChannel();
625 CloseStorageManagerChannel(); 629 CloseStorageManagerChannel();
626 CloseVideoChannel(); 630 CloseVideoChannel();
627 CloseWindowManagerChannel(); 631 CloseWindowManagerChannel();
628 } 632 }
629 633
630 } // namespace arc 634 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/arc_bridge_service.h ('k') | components/arc/arc_service_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698