OLD | NEW |
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/engine_impl/attachments/attachment_downloader_impl.h" | 5 #include "components/sync/engine_impl/attachments/attachment_downloader_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
| 8 #include <utility> |
8 | 9 |
9 #include "base/bind.h" | 10 #include "base/bind.h" |
10 #include "base/location.h" | 11 #include "base/location.h" |
11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
12 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
13 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
15 #include "base/test/histogram_tester.h" | 16 #include "base/test/histogram_tester.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
17 #include "components/sync/api/attachments/attachment.h" | |
18 #include "components/sync/engine/attachments/attachment_util.h" | 18 #include "components/sync/engine/attachments/attachment_util.h" |
19 #include "components/sync/engine_impl/attachments/attachment_uploader_impl.h" | 19 #include "components/sync/engine_impl/attachments/attachment_uploader_impl.h" |
| 20 #include "components/sync/model/attachments/attachment.h" |
20 #include "google_apis/gaia/fake_oauth2_token_service.h" | 21 #include "google_apis/gaia/fake_oauth2_token_service.h" |
21 #include "google_apis/gaia/gaia_constants.h" | 22 #include "google_apis/gaia/gaia_constants.h" |
22 #include "net/http/http_response_headers.h" | 23 #include "net/http/http_response_headers.h" |
23 #include "net/url_request/test_url_fetcher_factory.h" | 24 #include "net/url_request/test_url_fetcher_factory.h" |
24 #include "net/url_request/url_request_test_util.h" | 25 #include "net/url_request/url_request_test_util.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
26 #include "third_party/leveldatabase/src/util/crc32c.h" | 27 #include "third_party/leveldatabase/src/util/crc32c.h" |
27 | 28 |
28 namespace syncer { | 29 namespace syncer { |
29 | 30 |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 raw += "\n"; | 526 raw += "\n"; |
526 std::replace(raw.begin(), raw.end(), '\n', '\0'); | 527 std::replace(raw.begin(), raw.end(), '\n', '\0'); |
527 scoped_refptr<net::HttpResponseHeaders> headers( | 528 scoped_refptr<net::HttpResponseHeaders> headers( |
528 new net::HttpResponseHeaders(raw)); | 529 new net::HttpResponseHeaders(raw)); |
529 uint32_t extracted; | 530 uint32_t extracted; |
530 ASSERT_FALSE( | 531 ASSERT_FALSE( |
531 AttachmentDownloaderImpl::ExtractCrc32c(headers.get(), &extracted)); | 532 AttachmentDownloaderImpl::ExtractCrc32c(headers.get(), &extracted)); |
532 } | 533 } |
533 | 534 |
534 } // namespace syncer | 535 } // namespace syncer |
OLD | NEW |