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

Side by Side Diff: components/sync_driver/tab_node_pool.h

Issue 1355983002: Cleanup: Pass std::string as const reference from components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to PS2 Created 5 years, 2 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
« no previous file with comments | « components/sync_driver/device_info.cc ('k') | components/sync_driver/tab_node_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef COMPONENTS_SYNC_DRIVER_TAB_NODE_POOL_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_TAB_NODE_POOL_H_
6 #define COMPONENTS_SYNC_DRIVER_TAB_NODE_POOL_H_ 6 #define COMPONENTS_SYNC_DRIVER_TAB_NODE_POOL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // If free nodes > kFreeNodesHighWatermark, delete all free nodes until 48 // If free nodes > kFreeNodesHighWatermark, delete all free nodes until
49 // free nodes <= kFreeNodesLowWatermark. 49 // free nodes <= kFreeNodesLowWatermark.
50 static const size_t kFreeNodesLowWatermark; 50 static const size_t kFreeNodesLowWatermark;
51 51
52 // Maximum limit of FreeNodes allowed on the client. 52 // Maximum limit of FreeNodes allowed on the client.
53 static const size_t kFreeNodesHighWatermark; 53 static const size_t kFreeNodesHighWatermark;
54 54
55 static const int kInvalidTabNodeID; 55 static const int kInvalidTabNodeID;
56 56
57 // Build a sync tag from tab_node_id. 57 // Build a sync tag from tab_node_id.
58 static std::string TabIdToTag(const std::string machine_tag, 58 static std::string TabIdToTag(const std::string& machine_tag,
59 int tab_node_id); 59 int tab_node_id);
60 60
61 // Returns the tab_node_id for the next free tab node. If none are available, 61 // Returns the tab_node_id for the next free tab node. If none are available,
62 // creates a new tab node and adds it to free nodes pool. The free node can 62 // creates a new tab node and adds it to free nodes pool. The free node can
63 // then be used to associate with a tab by calling AssociateTabNode. 63 // then be used to associate with a tab by calling AssociateTabNode.
64 // Note: The node is considered free until it has been associated. Repeated 64 // Note: The node is considered free until it has been associated. Repeated
65 // calls to GetFreeTabNode will return the same id until node has been 65 // calls to GetFreeTabNode will return the same id until node has been
66 // associated. 66 // associated.
67 // |change_output| *must* be provided. It is the TabNodePool's link to 67 // |change_output| *must* be provided. It is the TabNodePool's link to
68 // the SyncChange pipeline that exists in the caller context. If the need 68 // the SyncChange pipeline that exists in the caller context. If the need
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // The machine tag associated with this tab pool. Used in the title of new 155 // The machine tag associated with this tab pool. Used in the title of new
156 // sync nodes. 156 // sync nodes.
157 std::string machine_tag_; 157 std::string machine_tag_;
158 158
159 DISALLOW_COPY_AND_ASSIGN(TabNodePool); 159 DISALLOW_COPY_AND_ASSIGN(TabNodePool);
160 }; 160 };
161 161
162 } // namespace browser_sync 162 } // namespace browser_sync
163 163
164 #endif // COMPONENTS_SYNC_DRIVER_TAB_NODE_POOL_H_ 164 #endif // COMPONENTS_SYNC_DRIVER_TAB_NODE_POOL_H_
OLDNEW
« no previous file with comments | « components/sync_driver/device_info.cc ('k') | components/sync_driver/tab_node_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698