| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/sync/glue/session_model_associator.h" | 5 #include "chrome/browser/sync/glue/session_model_associator.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "chrome/browser/browser_list.h" | 11 #include "chrome/browser/browser_list.h" |
| 12 #include "chrome/browser/browser_window.h" | 12 #include "chrome/browser/browser_window.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/sync/profile_sync_service.h" | 14 #include "chrome/browser/sync/profile_sync_service.h" |
| 15 #include "chrome/browser/sync/syncable/syncable.h" | 15 #include "chrome/browser/sync/syncable/syncable.h" |
| 16 #include "chrome/browser/tab_contents/navigation_controller.h" | |
| 17 #include "chrome/browser/tab_contents/navigation_entry.h" | |
| 18 #include "chrome/browser/tabs/tab_strip_model.h" | 16 #include "chrome/browser/tabs/tab_strip_model.h" |
| 19 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
| 20 #include "chrome/common/notification_details.h" | 18 #include "chrome/common/notification_details.h" |
| 21 #include "chrome/common/notification_service.h" | 19 #include "chrome/common/notification_service.h" |
| 22 #include "chrome/common/url_constants.h" | 20 #include "chrome/common/url_constants.h" |
| 21 #include "content/browser/tab_contents/navigation_controller.h" |
| 22 #include "content/browser/tab_contents/navigation_entry.h" |
| 23 | 23 |
| 24 namespace browser_sync { | 24 namespace browser_sync { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 static const char kNoSessionsFolderError[] = | 27 static const char kNoSessionsFolderError[] = |
| 28 "Server did not create the top-level sessions node. We " | 28 "Server did not create the top-level sessions node. We " |
| 29 "might be running against an out-of-date server."; | 29 "might be running against an out-of-date server."; |
| 30 | 30 |
| 31 // The maximum number of navigations in each direction we care to sync. | 31 // The maximum number of navigations in each direction we care to sync. |
| 32 static const int max_sync_navigation_count = 6; | 32 static const int max_sync_navigation_count = 6; |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 for (std::vector<TabNavigation>::const_iterator i = | 976 for (std::vector<TabNavigation>::const_iterator i = |
| 977 tab.navigations.begin(); i != tab.navigations.end(); ++i) { | 977 tab.navigations.begin(); i != tab.navigations.end(); ++i) { |
| 978 const TabNavigation navigation = *i; | 978 const TabNavigation navigation = *i; |
| 979 sync_pb::TabNavigation* tab_navigation = | 979 sync_pb::TabNavigation* tab_navigation = |
| 980 session_tab->add_navigation(); | 980 session_tab->add_navigation(); |
| 981 PopulateSessionSpecificsNavigation(&navigation, tab_navigation); | 981 PopulateSessionSpecificsNavigation(&navigation, tab_navigation); |
| 982 } | 982 } |
| 983 } | 983 } |
| 984 | 984 |
| 985 } // namespace browser_sync | 985 } // namespace browser_sync |
| OLD | NEW |