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

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 1919593003: arc: Prevent showing Opt-in UI when it is not expected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | 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 "chrome/browser/chromeos/arc/arc_auth_service.h" 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 observer_list_.AddObserver(observer); 402 observer_list_.AddObserver(observer);
403 } 403 }
404 404
405 void ArcAuthService::RemoveObserver(Observer* observer) { 405 void ArcAuthService::RemoveObserver(Observer* observer) {
406 DCHECK(thread_checker.Get().CalledOnValidThread()); 406 DCHECK(thread_checker.Get().CalledOnValidThread());
407 observer_list_.RemoveObserver(observer); 407 observer_list_.RemoveObserver(observer);
408 } 408 }
409 409
410 void ArcAuthService::CloseUI() { 410 void ArcAuthService::CloseUI() {
411 FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInUIClose()); 411 FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInUIClose());
412 SetUIPage(UIPage::NO_PAGE, base::string16());
412 if (!disable_ui_for_testing) 413 if (!disable_ui_for_testing)
khmel 2016/04/23 00:34:40 I have one more question. There is an idea to prev
xiyuan 2016/04/25 21:14:35 Have you checked AppListControllerDelegateAsh::Get
khmel 2016/04/26 16:37:10 This might be good point to insert this check.
413 ArcAuthNotification::Hide(); 414 ArcAuthNotification::Hide();
414 } 415 }
415 416
416 void ArcAuthService::SetUIPage(UIPage page, const base::string16& status) { 417 void ArcAuthService::SetUIPage(UIPage page, const base::string16& status) {
417 ui_page_ = page; 418 ui_page_ = page;
418 ui_page_status_ = status; 419 ui_page_status_ = status;
419 FOR_EACH_OBSERVER(Observer, observer_list_, 420 FOR_EACH_OBSERVER(Observer, observer_list_,
420 OnOptInUIShowPage(ui_page_, ui_page_status_)); 421 OnOptInUIShowPage(ui_page_, ui_page_status_));
421 } 422 }
422 423
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 return os << kStateFetchingCode; 533 return os << kStateFetchingCode;
533 case ArcAuthService::State::ACTIVE: 534 case ArcAuthService::State::ACTIVE:
534 return os << kStateActive; 535 return os << kStateActive;
535 default: 536 default:
536 NOTREACHED(); 537 NOTREACHED();
537 return os; 538 return os;
538 } 539 }
539 } 540 }
540 541
541 } // namespace arc 542 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698