| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/download/download_manager_impl.h" | 5 #include "content/browser/download/download_manager_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 MOCK_METHOD0(GetSSLHostStateDelegate, SSLHostStateDelegate*()); | 320 MOCK_METHOD0(GetSSLHostStateDelegate, SSLHostStateDelegate*()); |
| 321 MOCK_METHOD0(GetPermissionManager, PermissionManager*()); | 321 MOCK_METHOD0(GetPermissionManager, PermissionManager*()); |
| 322 MOCK_METHOD0(GetBackgroundSyncController, BackgroundSyncController*()); | 322 MOCK_METHOD0(GetBackgroundSyncController, BackgroundSyncController*()); |
| 323 MOCK_METHOD0(CreateMediaRequestContext, | 323 MOCK_METHOD0(CreateMediaRequestContext, |
| 324 net::URLRequestContextGetter*()); | 324 net::URLRequestContextGetter*()); |
| 325 MOCK_METHOD2(CreateMediaRequestContextForStoragePartition, | 325 MOCK_METHOD2(CreateMediaRequestContextForStoragePartition, |
| 326 net::URLRequestContextGetter*( | 326 net::URLRequestContextGetter*( |
| 327 const base::FilePath& partition_path, bool in_memory)); | 327 const base::FilePath& partition_path, bool in_memory)); |
| 328 | 328 |
| 329 // Define these two methods to avoid a | 329 // Define these two methods to avoid a |
| 330 // cannot access private member declared in class 'ScopedVector<net::URLReques
tInterceptor>' | 330 // 'cannot access private member declared in class |
| 331 // URLRequestInterceptorScopedVector' |
| 331 // build error if they're put in MOCK_METHOD. | 332 // build error if they're put in MOCK_METHOD. |
| 332 net::URLRequestContextGetter* CreateRequestContext( | 333 net::URLRequestContextGetter* CreateRequestContext( |
| 333 ProtocolHandlerMap* protocol_handlers, | 334 ProtocolHandlerMap* protocol_handlers, |
| 334 URLRequestInterceptorScopedVector request_interceptors) override { | 335 URLRequestInterceptorScopedVector request_interceptors) override { |
| 335 return nullptr; | 336 return nullptr; |
| 336 } | 337 } |
| 337 | 338 |
| 338 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 339 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| 339 const base::FilePath& partition_path, | 340 const base::FilePath& partition_path, |
| 340 bool in_memory, | 341 bool in_memory, |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0); | 641 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0); |
| 641 | 642 |
| 642 base::Callback<bool(const GURL&)> url_filter = | 643 base::Callback<bool(const GURL&)> url_filter = |
| 643 GetSingleURLFilter(download_urls_[0]); | 644 GetSingleURLFilter(download_urls_[0]); |
| 644 int remove_count = download_manager_->RemoveDownloadsByURLAndTime( | 645 int remove_count = download_manager_->RemoveDownloadsByURLAndTime( |
| 645 url_filter, base::Time(), base::Time::Max()); | 646 url_filter, base::Time(), base::Time::Max()); |
| 646 EXPECT_EQ(remove_count, 1); | 647 EXPECT_EQ(remove_count, 1); |
| 647 } | 648 } |
| 648 | 649 |
| 649 } // namespace content | 650 } // namespace content |
| OLD | NEW |