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 #include "chrome/browser/sync/glue/tab_node_pool.h" | 5 #include "chrome/browser/sync/glue/tab_node_pool.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/sync/profile_sync_service.h" | 11 #include "chrome/browser/sync/profile_sync_service.h" |
12 #include "sync/internal_api/public/base/model_type.h" | 12 #include "sync/internal_api/public/base/model_type.h" |
13 #include "sync/internal_api/public/read_node.h" | 13 #include "sync/internal_api/public/read_node.h" |
14 #include "sync/internal_api/public/write_node.h" | 14 #include "sync/internal_api/public/write_node.h" |
15 #include "sync/internal_api/public/write_transaction.h" | 15 #include "sync/internal_api/public/write_transaction.h" |
16 | 16 |
17 namespace browser_sync { | 17 namespace browser_sync { |
18 | 18 |
19 static const char kNoSessionsFolderError[] = | 19 static const char kNoSessionsFolderError[] = |
20 "Server did not create the top-level sessions node. We " | 20 "Server did not create the top-level sessions node. We " |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 void TabNodePool::FreeTabNode(int64 sync_id) { | 85 void TabNodePool::FreeTabNode(int64 sync_id) { |
86 // Pool size should always match # of free tab nodes. | 86 // Pool size should always match # of free tab nodes. |
87 DCHECK_LT(tab_pool_fp_, static_cast<int64>(tab_syncid_pool_.size())); | 87 DCHECK_LT(tab_pool_fp_, static_cast<int64>(tab_syncid_pool_.size())); |
88 tab_syncid_pool_[static_cast<size_t>(++tab_pool_fp_)] = sync_id; | 88 tab_syncid_pool_[static_cast<size_t>(++tab_pool_fp_)] = sync_id; |
89 } | 89 } |
90 | 90 |
91 } // namespace browser_sync | 91 } // namespace browser_sync |
OLD | NEW |