OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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. |
| 4 |
| 5 #ifndef COMPONENTS_SYNC_SESSIONS_SYNC_SESSIONS_CLIENT_H_ |
| 6 #define COMPONENTS_SYNC_SESSIONS_SYNC_SESSIONS_CLIENT_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 |
| 10 class GURL; |
| 11 |
| 12 namespace browser_sync { |
| 13 class SyncedWindowDelegatesGetter; |
| 14 } |
| 15 |
| 16 namespace sync_sessions { |
| 17 |
| 18 // Interface for clients of a sync sessions datatype. Should be used as a getter |
| 19 // for services and data the Sync Sessions datatype depends on. |
| 20 class SyncSessionsClient { |
| 21 public: |
| 22 SyncSessionsClient(); |
| 23 virtual ~SyncSessionsClient(); |
| 24 |
| 25 // Checks if the given url is considered interesting enough to sync. Most urls |
| 26 // are considered interesting. Examples of ones that are not are invalid urls, |
| 27 // files, and chrome internal pages. |
| 28 // TODO(zea): make this a standalone function if the url constants are |
| 29 // componentized. |
| 30 virtual bool ShouldSyncURL(const GURL& url) const = 0; |
| 31 |
| 32 // Returns the SyncedWindowDelegatesGetter for this client. |
| 33 virtual browser_sync::SyncedWindowDelegatesGetter* |
| 34 GetSyncedWindowDelegatesGetter() = 0; |
| 35 |
| 36 // TODO(zea): add getters for the history and favicon services for the favicon |
| 37 // cache to consume once it's componentized. |
| 38 |
| 39 private: |
| 40 DISALLOW_COPY_AND_ASSIGN(SyncSessionsClient); |
| 41 }; |
| 42 |
| 43 } // namespace sync_sessions |
| 44 |
| 45 #endif // COMPONENTS_SYNC_SESSIONS_SYNC_SESSIONS_CLIENT_H_ |
OLD | NEW |