Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: components/sync_sessions/tab_node_pool.cc

Issue 2753753005: [sync] WebContentsObserver based sessions notifications (Closed)
Patch Set: use base:MakeUnique, alphabetize Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/sync_sessions/tab_node_pool.h" 5 #include "components/sync_sessions/tab_node_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "components/sync/base/model_type.h" 10 #include "components/sync/base/model_type.h"
11 #include "components/sync/protocol/session_specifics.pb.h" 11 #include "components/sync/protocol/session_specifics.pb.h"
12 #include "components/sync/protocol/sync.pb.h" 12 #include "components/sync/protocol/sync.pb.h"
13 #include "components/sync_sessions/synced_tab_delegate.h"
13 14
14 namespace sync_sessions { 15 namespace sync_sessions {
15 16
16 const size_t TabNodePool::kFreeNodesLowWatermark = 25; 17 const size_t TabNodePool::kFreeNodesLowWatermark = 25;
17 const size_t TabNodePool::kFreeNodesHighWatermark = 100; 18 const size_t TabNodePool::kFreeNodesHighWatermark = 100;
18 19
19 TabNodePool::TabNodePool() : max_used_tab_node_id_(kInvalidTabNodeID) {} 20 TabNodePool::TabNodePool() : max_used_tab_node_id_(kInvalidTabNodeID) {}
20 21
21 // static 22 // static
22 // We start vending tab node IDs at 0. 23 // We start vending tab node IDs at 0.
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 151
151 bool TabNodePool::Empty() const { 152 bool TabNodePool::Empty() const {
152 return free_nodes_pool_.empty(); 153 return free_nodes_pool_.empty();
153 } 154 }
154 155
155 bool TabNodePool::Full() { 156 bool TabNodePool::Full() {
156 return nodeid_tabid_map_.empty(); 157 return nodeid_tabid_map_.empty();
157 } 158 }
158 159
159 } // namespace sync_sessions 160 } // namespace sync_sessions
OLDNEW
« no previous file with comments | « components/sync_sessions/tab_node_pool.h ('k') | ios/chrome/browser/sync/ios_chrome_sync_client.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698