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 "sync/internal_api/public/attachments/attachment_downloader_impl.h" | 5 #include "sync/internal_api/public/attachments/attachment_downloader_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/test/histogram_tester.h" | 15 #include "base/test/histogram_tester.h" |
16 #include "base/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
17 #include "google_apis/gaia/fake_oauth2_token_service.h" | 17 #include "google_apis/gaia/fake_oauth2_token_service.h" |
18 #include "google_apis/gaia/gaia_constants.h" | 18 #include "google_apis/gaia/gaia_constants.h" |
19 #include "net/http/http_response_headers.h" | 19 #include "net/http/http_response_headers.h" |
20 #include "net/url_request/test_url_fetcher_factory.h" | 20 #include "net/url_request/test_url_fetcher_factory.h" |
21 #include "net/url_request/url_request_test_util.h" | 21 #include "net/url_request/url_request_test_util.h" |
22 #include "sync/api/attachments/attachment.h" | 22 #include "sync/api/attachments/attachment.h" |
23 #include "sync/internal_api/public/attachments/attachment_uploader_impl.h" | 23 #include "sync/internal_api/public/attachments/attachment_uploader_impl.h" |
24 #include "sync/internal_api/public/attachments/attachment_util.h" | 24 #include "sync/internal_api/public/attachments/attachment_util.h" |
25 #include "sync/internal_api/public/base/model_type.h" | 25 #include "sync/internal_api/public/base/model_type.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 raw += "\n"; | 532 raw += "\n"; |
533 std::replace(raw.begin(), raw.end(), '\n', '\0'); | 533 std::replace(raw.begin(), raw.end(), '\n', '\0'); |
534 scoped_refptr<net::HttpResponseHeaders> headers( | 534 scoped_refptr<net::HttpResponseHeaders> headers( |
535 new net::HttpResponseHeaders(raw)); | 535 new net::HttpResponseHeaders(raw)); |
536 uint32_t extracted; | 536 uint32_t extracted; |
537 ASSERT_FALSE( | 537 ASSERT_FALSE( |
538 AttachmentDownloaderImpl::ExtractCrc32c(headers.get(), &extracted)); | 538 AttachmentDownloaderImpl::ExtractCrc32c(headers.get(), &extracted)); |
539 } | 539 } |
540 | 540 |
541 } // namespace syncer | 541 } // namespace syncer |
OLD | NEW |