Vectorize website settings icons in omnibox
[chromium-blink-merge.git] / components / sync_driver / sync_error_controller.cc
blob2db92771f799136e866062d1387836db8924772b
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 "components/sync_driver/sync_error_controller.h"
7 #include "components/sync_driver/sync_service.h"
9 SyncErrorController::SyncErrorController(sync_driver::SyncService* service)
10 : service_(service) {
11 DCHECK(service_);
14 SyncErrorController::~SyncErrorController() {
17 bool SyncErrorController::HasError() {
18 return service_->HasSyncSetupCompleted() &&
19 service_->IsPassphraseRequired() &&
20 service_->IsPassphraseRequiredForDecryption();
23 void SyncErrorController::AddObserver(Observer* observer) {
24 observer_list_.AddObserver(observer);
27 void SyncErrorController::RemoveObserver(Observer* observer) {
28 observer_list_.RemoveObserver(observer);
31 void SyncErrorController::OnStateChanged() {
32 FOR_EACH_OBSERVER(Observer,
33 observer_list_,
34 OnErrorChanged());