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

Side by Side Diff: sync/test/fake_extensions_activity_monitor.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 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 | Annotate | Revision Log
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/test/fake_extensions_activity_monitor.h" 5 #include "sync/test/fake_extensions_activity_monitor.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace browser_sync { 9 namespace browser_sync {
10 10
11 FakeExtensionsActivityMonitor::FakeExtensionsActivityMonitor() {} 11 FakeExtensionsActivityMonitor::FakeExtensionsActivityMonitor() {}
12 12
13 FakeExtensionsActivityMonitor::~FakeExtensionsActivityMonitor() { 13 FakeExtensionsActivityMonitor::~FakeExtensionsActivityMonitor() {
14 DCHECK(non_thread_safe_.CalledOnValidThread()); 14 DCHECK(non_thread_safe_.CalledOnValidThread());
15 } 15 }
16 16
17 void FakeExtensionsActivityMonitor::GetAndClearRecords(Records* buffer) { 17 void FakeExtensionsActivityMonitor::GetAndClearRecords(Records* buffer) {
18 DCHECK(non_thread_safe_.CalledOnValidThread()); 18 DCHECK(non_thread_safe_.CalledOnValidThread());
19 buffer->clear(); 19 buffer->clear();
20 buffer->swap(records_); 20 buffer->swap(records_);
21 } 21 }
22 22
23 void FakeExtensionsActivityMonitor::PutRecords(const Records& records) { 23 void FakeExtensionsActivityMonitor::PutRecords(const Records& records) {
24 DCHECK(non_thread_safe_.CalledOnValidThread()); 24 DCHECK(non_thread_safe_.CalledOnValidThread());
25 for (Records::const_iterator i = records.begin(); i != records.end(); ++i) { 25 for (Records::const_iterator i = records.begin(); i != records.end(); ++i) {
26 records_[i->first].extension_id = i->second.extension_id; 26 records_[i->first].extension_id = i->second.extension_id;
27 records_[i->first].bookmark_write_count += i->second.bookmark_write_count; 27 records_[i->first].bookmark_write_count += i->second.bookmark_write_count;
28 } 28 }
29 } 29 }
30 30
31 } // namespace browser_sync 31 } // namespace browser_sync
OLDNEW
« no previous file with comments | « sync/test/fake_extensions_activity_monitor.h ('k') | sync/test/null_directory_change_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698