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/signin/ios/browser/merge_session_observer_bridge.h"
7 #include "base/logging.h"
8 #include "components/signin/core/browser/account_reconcilor.h"
9 #include "google_apis/gaia/google_service_auth_error.h"
11 MergeSessionObserverBridge::MergeSessionObserverBridge(
12 id<MergeSessionObserverBridgeDelegate> delegate,
13 AccountReconcilor* account_reconcilor)
14 : delegate_(delegate), account_reconcilor_(account_reconcilor) {
16 DCHECK(account_reconcilor);
17 account_reconcilor_->AddMergeSessionObserver(this);
20 MergeSessionObserverBridge::~MergeSessionObserverBridge() {
21 account_reconcilor_->RemoveMergeSessionObserver(this);
24 void MergeSessionObserverBridge::MergeSessionCompleted(
25 const std::string& account_id,
26 const GoogleServiceAuthError& error) {
27 [delegate_ onMergeSessionCompleted:account_id error:error];