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

Side by Side Diff: chrome/browser/sync/glue/tab_node_pool.cc

Issue 13721002: Add a space between string literals and PRIuS (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 8 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 | « no previous file | sync/engine/apply_control_data_updates_unittest.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 (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/utf_string_conversions.h"
(...skipping 14 matching lines...) Expand all
25 : tab_pool_fp_(-1), 25 : tab_pool_fp_(-1),
26 sync_service_(sync_service) { 26 sync_service_(sync_service) {
27 } 27 }
28 28
29 TabNodePool::~TabNodePool() {} 29 TabNodePool::~TabNodePool() {}
30 30
31 // Static 31 // Static
32 std::string TabNodePool::TabIdToTag( 32 std::string TabNodePool::TabIdToTag(
33 const std::string machine_tag, 33 const std::string machine_tag,
34 size_t tab_node_id) { 34 size_t tab_node_id) {
35 return base::StringPrintf("%s %"PRIuS"", machine_tag.c_str(), tab_node_id); 35 return base::StringPrintf("%s %" PRIuS "", machine_tag.c_str(), tab_node_id);
Nico 2013/04/05 17:05:37 (I think you only need the space in front of PRIus
stuartmorgan 2013/04/05 18:48:08 Yeah, but I thought that looked really strange sin
36 } 36 }
37 37
38 void TabNodePool::AddTabNode(int64 sync_id) { 38 void TabNodePool::AddTabNode(int64 sync_id) {
39 tab_syncid_pool_.resize(tab_syncid_pool_.size() + 1); 39 tab_syncid_pool_.resize(tab_syncid_pool_.size() + 1);
40 tab_syncid_pool_[static_cast<size_t>(++tab_pool_fp_)] = sync_id; 40 tab_syncid_pool_[static_cast<size_t>(++tab_pool_fp_)] = sync_id;
41 } 41 }
42 42
43 int64 TabNodePool::GetFreeTabNode() { 43 int64 TabNodePool::GetFreeTabNode() {
44 DCHECK_GT(machine_tag_.length(), 0U); 44 DCHECK_GT(machine_tag_.length(), 0U);
45 if (tab_pool_fp_ == -1) { 45 if (tab_pool_fp_ == -1) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | sync/engine/apply_control_data_updates_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698