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

Side by Side Diff: components/sync/core_impl/attachments/attachment_uploader_impl_unittest.cc

Issue 2388973002: [Sync] Removing duplicate includes, part 2. (Closed)
Patch Set: Update for Max's comments. 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/core/attachments/attachment_uploader_impl.h" 5 #include "components/sync/core/attachments/attachment_uploader_impl.h"
6 6
7 #include <string>
8 #include <utility> 7 #include <utility>
9 #include <vector> 8 #include <vector>
10 9
11 #include "base/bind.h" 10 #include "base/bind.h"
12 #include "base/callback.h" 11 #include "base/callback.h"
13 #include "base/location.h" 12 #include "base/location.h"
14 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
15 #include "base/memory/ref_counted_memory.h" 14 #include "base/memory/ref_counted_memory.h"
16 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
17 #include "base/run_loop.h" 16 #include "base/run_loop.h"
18 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
19 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/stringprintf.h" 19 #include "base/strings/stringprintf.h"
21 #include "base/synchronization/lock.h" 20 #include "base/synchronization/lock.h"
22 #include "base/test/histogram_tester.h" 21 #include "base/test/histogram_tester.h"
23 #include "base/threading/non_thread_safe.h"
24 #include "base/threading/thread.h" 22 #include "base/threading/thread.h"
25 #include "base/threading/thread_task_runner_handle.h" 23 #include "base/threading/thread_task_runner_handle.h"
26 #include "components/sync/api/attachments/attachment.h" 24 #include "components/sync/api/attachments/attachment.h"
27 #include "components/sync/base/model_type.h"
28 #include "components/sync/core/attachments/attachment_util.h" 25 #include "components/sync/core/attachments/attachment_util.h"
29 #include "components/sync/protocol/sync.pb.h" 26 #include "components/sync/protocol/sync.pb.h"
30 #include "google_apis/gaia/fake_oauth2_token_service.h" 27 #include "google_apis/gaia/fake_oauth2_token_service.h"
31 #include "google_apis/gaia/gaia_constants.h" 28 #include "google_apis/gaia/gaia_constants.h"
32 #include "google_apis/gaia/oauth2_token_service_request.h"
33 #include "net/http/http_status_code.h" 29 #include "net/http/http_status_code.h"
34 #include "net/test/embedded_test_server/embedded_test_server.h" 30 #include "net/test/embedded_test_server/embedded_test_server.h"
35 #include "net/test/embedded_test_server/http_request.h" 31 #include "net/test/embedded_test_server/http_request.h"
36 #include "net/test/embedded_test_server/http_response.h" 32 #include "net/test/embedded_test_server/http_response.h"
37 #include "net/url_request/url_request_test_util.h" 33 #include "net/url_request/url_request_test_util.h"
38 #include "testing/gmock/include/gmock/gmock-matchers.h" 34 #include "testing/gmock/include/gmock/gmock-matchers.h"
39 #include "testing/gtest/include/gtest/gtest.h" 35 #include "testing/gtest/include/gtest/gtest.h"
40 36
41 namespace syncer { 37 namespace syncer {
42 38
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 scoped_refptr<base::RefCountedString> hello_world(new base::RefCountedString); 663 scoped_refptr<base::RefCountedString> hello_world(new base::RefCountedString);
668 hello_world->data() = "hello world"; 664 hello_world->data() = "hello world";
669 EXPECT_EQ("yZRlqg==", AttachmentUploaderImpl::FormatCrc32cHash( 665 EXPECT_EQ("yZRlqg==", AttachmentUploaderImpl::FormatCrc32cHash(
670 ComputeCrc32c(hello_world))); 666 ComputeCrc32c(hello_world)));
671 } 667 }
672 668
673 // TODO(maniscalco): Add test case for when we are uploading an attachment that 669 // TODO(maniscalco): Add test case for when we are uploading an attachment that
674 // already exists. 409 Conflict? (bug 379825) 670 // already exists. 409 Conflict? (bug 379825)
675 671
676 } // namespace syncer 672 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698