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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc

Issue 291403004: [SyncFS] Add TaskLogger and wire up it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 6 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 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 <deque> 5 #include <deque>
6 #include <string> 6 #include <string>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // DriveFileSyncManager::Client overrides. 68 // DriveFileSyncManager::Client overrides.
69 virtual void MaybeScheduleNextTask() OVERRIDE { 69 virtual void MaybeScheduleNextTask() OVERRIDE {
70 ++maybe_schedule_next_task_count_; 70 ++maybe_schedule_next_task_count_;
71 } 71 }
72 virtual void NotifyLastOperationStatus( 72 virtual void NotifyLastOperationStatus(
73 SyncStatusCode last_operation_status, 73 SyncStatusCode last_operation_status,
74 bool last_operation_used_network) OVERRIDE { 74 bool last_operation_used_network) OVERRIDE {
75 last_operation_status_ = last_operation_status; 75 last_operation_status_ = last_operation_status;
76 } 76 }
77 77
78 virtual void RecordTaskLog(scoped_ptr<TaskLogger::TaskLog>) OVERRIDE {}
79
78 void ScheduleTask(SyncStatusCode status_to_return, 80 void ScheduleTask(SyncStatusCode status_to_return,
79 const SyncStatusCallback& callback) { 81 const SyncStatusCallback& callback) {
80 task_manager_->ScheduleTask( 82 task_manager_->ScheduleTask(
81 FROM_HERE, 83 FROM_HERE,
82 base::Bind(&TaskManagerClient::DoTask, AsWeakPtr(), 84 base::Bind(&TaskManagerClient::DoTask, AsWeakPtr(),
83 status_to_return, false /* idle */), 85 status_to_return, false /* idle */),
84 SyncTaskManager::PRIORITY_MED, 86 SyncTaskManager::PRIORITY_MED,
85 callback); 87 callback);
86 } 88 }
87 89
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 653
652 EXPECT_EQ("task1: finished", log[i++]); 654 EXPECT_EQ("task1: finished", log[i++]);
653 655
654 EXPECT_EQ("task2: updating to /hoge/fuga/piyo", log[i++]); 656 EXPECT_EQ("task2: updating to /hoge/fuga/piyo", log[i++]);
655 EXPECT_EQ("task2: updated to /hoge/fuga/piyo", log[i++]); 657 EXPECT_EQ("task2: updated to /hoge/fuga/piyo", log[i++]);
656 EXPECT_EQ("task2: finished", log[i++]); 658 EXPECT_EQ("task2: finished", log[i++]);
657 } 659 }
658 660
659 } // namespace drive_backend 661 } // namespace drive_backend
660 } // namespace sync_file_system 662 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698