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

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: TODO added 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/app_list/app_list_controller_ash.cc » ('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 "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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 observer_list_.AddObserver(observer); 405 observer_list_.AddObserver(observer);
406 } 406 }
407 407
408 void ArcAuthService::RemoveObserver(Observer* observer) { 408 void ArcAuthService::RemoveObserver(Observer* observer) {
409 DCHECK(thread_checker.Get().CalledOnValidThread()); 409 DCHECK(thread_checker.Get().CalledOnValidThread());
410 observer_list_.RemoveObserver(observer); 410 observer_list_.RemoveObserver(observer);
411 } 411 }
412 412
413 void ArcAuthService::CloseUI() { 413 void ArcAuthService::CloseUI() {
414 FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInUIClose()); 414 FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInUIClose());
415 SetUIPage(UIPage::NO_PAGE, base::string16());
415 if (!disable_ui_for_testing) 416 if (!disable_ui_for_testing)
416 ArcAuthNotification::Hide(); 417 ArcAuthNotification::Hide();
417 } 418 }
418 419
419 void ArcAuthService::SetUIPage(UIPage page, const base::string16& status) { 420 void ArcAuthService::SetUIPage(UIPage page, const base::string16& status) {
420 ui_page_ = page; 421 ui_page_ = page;
421 ui_page_status_ = status; 422 ui_page_status_ = status;
422 FOR_EACH_OBSERVER(Observer, observer_list_, 423 FOR_EACH_OBSERVER(Observer, observer_list_,
423 OnOptInUIShowPage(ui_page_, ui_page_status_)); 424 OnOptInUIShowPage(ui_page_, ui_page_status_));
424 } 425 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 return os << kStateFetchingCode; 536 return os << kStateFetchingCode;
536 case ArcAuthService::State::ACTIVE: 537 case ArcAuthService::State::ACTIVE:
537 return os << kStateActive; 538 return os << kStateActive;
538 default: 539 default:
539 NOTREACHED(); 540 NOTREACHED();
540 return os; 541 return os;
541 } 542 }
542 } 543 }
543 544
544 } // namespace arc 545 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/app_list/app_list_controller_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698