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 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 net::URLRequestContextGetter*( | 421 net::URLRequestContextGetter*( |
422 const base::FilePath& partition_path, bool in_memory)); | 422 const base::FilePath& partition_path, bool in_memory)); |
423 MOCK_METHOD0(GetResourceContext, ResourceContext*()); | 423 MOCK_METHOD0(GetResourceContext, ResourceContext*()); |
424 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*()); | 424 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*()); |
425 MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ()); | 425 MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ()); |
426 MOCK_METHOD0(GetSpecialStoragePolicy, storage::SpecialStoragePolicy*()); | 426 MOCK_METHOD0(GetSpecialStoragePolicy, storage::SpecialStoragePolicy*()); |
427 MOCK_METHOD0(GetPushMessagingService, PushMessagingService*()); | 427 MOCK_METHOD0(GetPushMessagingService, PushMessagingService*()); |
428 MOCK_METHOD0(GetSSLHostStateDelegate, SSLHostStateDelegate*()); | 428 MOCK_METHOD0(GetSSLHostStateDelegate, SSLHostStateDelegate*()); |
429 MOCK_METHOD0(GetPermissionManager, PermissionManager*()); | 429 MOCK_METHOD0(GetPermissionManager, PermissionManager*()); |
430 MOCK_METHOD0(GetBackgroundSyncController, BackgroundSyncController*()); | 430 MOCK_METHOD0(GetBackgroundSyncController, BackgroundSyncController*()); |
| 431 MOCK_METHOD0(GetChooserPermissionManager, ChooserPermissionManager*()); |
431 | 432 |
432 scoped_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( | 433 scoped_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( |
433 const base::FilePath& path) override { | 434 const base::FilePath& path) override { |
434 return scoped_ptr<ZoomLevelDelegate>(CreateZoomLevelDelegateMock(path)); | 435 return scoped_ptr<ZoomLevelDelegate>(CreateZoomLevelDelegateMock(path)); |
435 } | 436 } |
436 }; | 437 }; |
437 | 438 |
438 class MockDownloadManagerObserver : public DownloadManager::Observer { | 439 class MockDownloadManagerObserver : public DownloadManager::Observer { |
439 public: | 440 public: |
440 MockDownloadManagerObserver() {} | 441 MockDownloadManagerObserver() {} |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 EXPECT_CALL(GetMockDownloadItem(0), Remove()); | 721 EXPECT_CALL(GetMockDownloadItem(0), Remove()); |
721 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0); | 722 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0); |
722 | 723 |
723 url::Origin origin_to_clear(download_urls_[0]); | 724 url::Origin origin_to_clear(download_urls_[0]); |
724 int remove_count = download_manager_->RemoveDownloadsByOriginAndTime( | 725 int remove_count = download_manager_->RemoveDownloadsByOriginAndTime( |
725 origin_to_clear, base::Time(), base::Time::Max()); | 726 origin_to_clear, base::Time(), base::Time::Max()); |
726 EXPECT_EQ(remove_count, 1); | 727 EXPECT_EQ(remove_count, 1); |
727 } | 728 } |
728 | 729 |
729 } // namespace content | 730 } // namespace content |
OLD | NEW |