Fix crash on app list start page contents not existing.
[chromium-blink-merge.git] / components / signin / ios / browser / merge_session_observer_bridge.mm
blob73b7bcddfd3cd50322aad7ddb44fdb9b9f150bcf
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) {
15   DCHECK(delegate);
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];