OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |