Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / sync / sync_error_controller.cc
blobc6346d0396ae6b989fdc393cf0a6cfb4ec0ddbde
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/sync/sync_error_controller.h"
7 #include "chrome/browser/sync/profile_sync_service.h"
8 #include "chrome/browser/sync/profile_sync_service_factory.h"
10 SyncErrorController::SyncErrorController(ProfileSyncService* service)
11 : service_(service) {
12 DCHECK(service_);
15 SyncErrorController::~SyncErrorController() {
18 bool SyncErrorController::HasError() {
19 return service_->HasSyncSetupCompleted() &&
20 service_->IsPassphraseRequired() &&
21 service_->IsPassphraseRequiredForDecryption();
24 void SyncErrorController::AddObserver(Observer* observer) {
25 observer_list_.AddObserver(observer);
28 void SyncErrorController::RemoveObserver(Observer* observer) {
29 observer_list_.RemoveObserver(observer);
32 void SyncErrorController::OnStateChanged() {
33 FOR_EACH_OBSERVER(Observer,
34 observer_list_,
35 OnErrorChanged());