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

Side by Side Diff: components/sync/model_impl/attachments/attachment_service_impl.cc

Issue 2401223002: [Sync] Renaming sync/api* to sync/model*. (Closed)
Patch Set: Missed a comment in a DEPS file, and rebasing. Created 4 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
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 "components/sync/api_impl/attachments/attachment_service_impl.h" 5 #include "components/sync/model_impl/attachments/attachment_service_impl.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "base/threading/thread_task_runner_handle.h" 13 #include "base/threading/thread_task_runner_handle.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "components/sync/api/attachments/attachment.h"
16 #include "components/sync/engine/attachments/fake_attachment_downloader.h" 15 #include "components/sync/engine/attachments/fake_attachment_downloader.h"
17 #include "components/sync/engine/attachments/fake_attachment_uploader.h" 16 #include "components/sync/engine/attachments/fake_attachment_uploader.h"
17 #include "components/sync/model/attachments/attachment.h"
18 18
19 namespace syncer { 19 namespace syncer {
20 20
21 // GetOrDownloadAttachments starts multiple parallel DownloadAttachment calls. 21 // GetOrDownloadAttachments starts multiple parallel DownloadAttachment calls.
22 // GetOrDownloadState tracks completion of these calls and posts callback for 22 // GetOrDownloadState tracks completion of these calls and posts callback for
23 // consumer once all attachments are either retrieved or reported unavailable. 23 // consumer once all attachments are either retrieved or reported unavailable.
24 class AttachmentServiceImpl::GetOrDownloadState 24 class AttachmentServiceImpl::GetOrDownloadState
25 : public base::RefCounted<GetOrDownloadState>, 25 : public base::RefCounted<GetOrDownloadState>,
26 public base::NonThreadSafe { 26 public base::NonThreadSafe {
27 public: 27 public:
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 weak_ptr_factory_.GetWeakPtr())); 303 weak_ptr_factory_.GetWeakPtr()));
304 } 304 }
305 } 305 }
306 306
307 void AttachmentServiceImpl::SetTimerForTest( 307 void AttachmentServiceImpl::SetTimerForTest(
308 std::unique_ptr<base::Timer> timer) { 308 std::unique_ptr<base::Timer> timer) {
309 upload_task_queue_->SetTimerForTest(std::move(timer)); 309 upload_task_queue_->SetTimerForTest(std::move(timer));
310 } 310 }
311 311
312 } // namespace syncer 312 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698