| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_NTP_SNIPPETS_SESSIONS_TAB_DELEGATE_SYNC_ADAPTER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_SESSIONS_TAB_DELEGATE_SYNC_ADAPTER_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_SESSIONS_TAB_DELEGATE_SYNC_ADAPTER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_SESSIONS_TAB_DELEGATE_SYNC_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // syncer::SyncServiceObserver implementation. | 38 // syncer::SyncServiceObserver implementation. |
| 39 void OnStateChanged() override; | 39 void OnStateChanged() override; |
| 40 void OnSyncConfigurationCompleted() override; | 40 void OnSyncConfigurationCompleted() override; |
| 41 void OnForeignSessionUpdated() override; | 41 void OnForeignSessionUpdated() override; |
| 42 | 42 |
| 43 void InvokeCallback(); | 43 void InvokeCallback(); |
| 44 | 44 |
| 45 syncer::SyncService* sync_service_; | 45 syncer::SyncService* sync_service_; |
| 46 base::Closure change_callback_; | 46 base::Closure change_callback_; |
| 47 | 47 |
| 48 // Represents whether there was session data the last time |change_callback_| |
| 49 // was invoked. |
| 50 bool had_session_data_ = false; |
| 51 |
| 48 DISALLOW_COPY_AND_ASSIGN(TabDelegateSyncAdapter); | 52 DISALLOW_COPY_AND_ASSIGN(TabDelegateSyncAdapter); |
| 49 }; | 53 }; |
| 50 | 54 |
| 51 } // namespace ntp_snippets | 55 } // namespace ntp_snippets |
| 52 | 56 |
| 53 #endif // COMPONENTS_NTP_SNIPPETS_SESSIONS_TAB_DELEGATE_SYNC_ADAPTER_H_ | 57 #endif // COMPONENTS_NTP_SNIPPETS_SESSIONS_TAB_DELEGATE_SYNC_ADAPTER_H_ |
| OLD | NEW |