OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_file_system/drive_backend/sync_engine.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 DISALLOW_COPY_AND_ASSIGN(WorkerObserver); | 155 DISALLOW_COPY_AND_ASSIGN(WorkerObserver); |
156 }; | 156 }; |
157 | 157 |
158 namespace { | 158 namespace { |
159 | 159 |
160 void DidRegisterOrigin(const base::TimeTicks& start_time, | 160 void DidRegisterOrigin(const base::TimeTicks& start_time, |
161 const SyncStatusCallback& callback, | 161 const SyncStatusCallback& callback, |
162 SyncStatusCode status) { | 162 SyncStatusCode status) { |
163 base::TimeDelta delta(base::TimeTicks::Now() - start_time); | 163 base::TimeDelta delta(base::TimeTicks::Now() - start_time); |
164 HISTOGRAM_TIMES("SyncFileSystem.RegisterOriginTime", delta); | 164 LOCAL_HISTOGRAM_TIMES("SyncFileSystem.RegisterOriginTime", delta); |
165 callback.Run(status); | 165 callback.Run(status); |
166 } | 166 } |
167 | 167 |
168 template <typename T> | 168 template <typename T> |
169 void DeleteSoonHelper(scoped_ptr<T>) {} | 169 void DeleteSoonHelper(scoped_ptr<T>) {} |
170 | 170 |
171 template <typename T> | 171 template <typename T> |
172 void DeleteSoon(const tracked_objects::Location& from_here, | 172 void DeleteSoon(const tracked_objects::Location& from_here, |
173 base::TaskRunner* task_runner, | 173 base::TaskRunner* task_runner, |
174 scoped_ptr<T> obj) { | 174 scoped_ptr<T> obj) { |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 | 782 |
783 SyncStatusCallback SyncEngine::TrackCallback( | 783 SyncStatusCallback SyncEngine::TrackCallback( |
784 const SyncStatusCallback& callback) { | 784 const SyncStatusCallback& callback) { |
785 return callback_tracker_.Register( | 785 return callback_tracker_.Register( |
786 base::Bind(callback, SYNC_STATUS_ABORT), | 786 base::Bind(callback, SYNC_STATUS_ABORT), |
787 callback); | 787 callback); |
788 } | 788 } |
789 | 789 |
790 } // namespace drive_backend | 790 } // namespace drive_backend |
791 } // namespace sync_file_system | 791 } // namespace sync_file_system |
OLD | NEW |