| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/sessions/session_id.h" | 21 #include "chrome/browser/sessions/session_id.h" |
| 22 #include "chrome/browser/sessions/session_service.h" | 22 #include "chrome/browser/sessions/session_service.h" |
| 23 #include "chrome/browser/sessions/session_types.h" | 23 #include "chrome/browser/sessions/session_types.h" |
| 24 #include "chrome/browser/sync/glue/model_associator.h" | 24 #include "chrome/browser/sync/glue/model_associator.h" |
| 25 #include "chrome/browser/sync/glue/synced_session_tracker.h" | 25 #include "chrome/browser/sync/glue/synced_session_tracker.h" |
| 26 #include "chrome/browser/sync/glue/tab_node_pool.h" | 26 #include "chrome/browser/sync/glue/tab_node_pool.h" |
| 27 #include "chrome/common/cancelable_task_tracker.h" | 27 #include "chrome/common/cancelable_task_tracker.h" |
| 28 #include "googleurl/src/gurl.h" | 28 #include "googleurl/src/gurl.h" |
| 29 #include "sync/internal_api/public/base/model_type.h" | 29 #include "sync/internal_api/public/base/model_type.h" |
| 30 | 30 |
| 31 class Prefservice; | 31 class PrefServiceSyncable; |
| 32 class Profile; | 32 class Profile; |
| 33 class ProfileSyncService; | 33 class ProfileSyncService; |
| 34 | 34 |
| 35 namespace syncer { | 35 namespace syncer { |
| 36 class ReadNode; | 36 class ReadNode; |
| 37 class WriteTransaction; | 37 class WriteTransaction; |
| 38 } // namespace syncer | 38 } // namespace syncer |
| 39 | 39 |
| 40 namespace sync_pb { | 40 namespace sync_pb { |
| 41 class SessionHeader; | 41 class SessionHeader; |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 | 408 |
| 409 // During integration tests, we sometimes need to block until a local change | 409 // During integration tests, we sometimes need to block until a local change |
| 410 // is made. | 410 // is made. |
| 411 bool waiting_for_change_; | 411 bool waiting_for_change_; |
| 412 base::WeakPtrFactory<SessionModelAssociator> test_weak_factory_; | 412 base::WeakPtrFactory<SessionModelAssociator> test_weak_factory_; |
| 413 | 413 |
| 414 // Profile being synced. Weak pointer. | 414 // Profile being synced. Weak pointer. |
| 415 Profile* const profile_; | 415 Profile* const profile_; |
| 416 | 416 |
| 417 // Pref service. Used to persist the session sync guid. Weak pointer. | 417 // Pref service. Used to persist the session sync guid. Weak pointer. |
| 418 PrefService* const pref_service_; | 418 PrefServiceSyncable* const pref_service_; |
| 419 | 419 |
| 420 DataTypeErrorHandler* error_handler_; | 420 DataTypeErrorHandler* error_handler_; |
| 421 | 421 |
| 422 // Used for loading favicons. | 422 // Used for loading favicons. |
| 423 CancelableTaskTracker cancelable_task_tracker_; | 423 CancelableTaskTracker cancelable_task_tracker_; |
| 424 | 424 |
| 425 // Synced favicon storage and tracking. | 425 // Synced favicon storage and tracking. |
| 426 // Map of favicon URL -> favicon info for favicons synced from other clients. | 426 // Map of favicon URL -> favicon info for favicons synced from other clients. |
| 427 // TODO(zea): if this becomes expensive memory-wise, reconsider using the | 427 // TODO(zea): if this becomes expensive memory-wise, reconsider using the |
| 428 // favicon service instead. For now, this is simpler due to the history | 428 // favicon service instead. For now, this is simpler due to the history |
| (...skipping 18 matching lines...) Expand all Loading... |
| 447 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_; | 447 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_; |
| 448 // Map of page URL -> favicon url. | 448 // Map of page URL -> favicon url. |
| 449 std::map<std::string, std::string> synced_favicon_pages_; | 449 std::map<std::string, std::string> synced_favicon_pages_; |
| 450 | 450 |
| 451 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); | 451 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); |
| 452 }; | 452 }; |
| 453 | 453 |
| 454 } // namespace browser_sync | 454 } // namespace browser_sync |
| 455 | 455 |
| 456 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ | 456 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ |
| OLD | NEW |