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 "google_apis/gaia/google_service_auth_error.h"
10 MergeSessionObserverBridge::MergeSessionObserverBridge(
11 id<MergeSessionObserverBridgeDelegate> delegate,
12 GaiaCookieManagerService* cookie_manager_service)
13 : delegate_(delegate), cookie_manager_service_(cookie_manager_service) {
15 DCHECK(cookie_manager_service);
16 cookie_manager_service_->AddObserver(this);
19 MergeSessionObserverBridge::~MergeSessionObserverBridge() {
20 cookie_manager_service_->RemoveObserver(this);
23 void MergeSessionObserverBridge::OnAddAccountToCookieCompleted(
24 const std::string& account_id,
25 const GoogleServiceAuthError& error) {
26 [delegate_ onMergeSessionCompleted:account_id error:error];