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

Side by Side Diff: content/browser/download/download_manager_impl_unittest.cc

Issue 1878153002: Revert of Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 (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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 public: 409 public:
410 MockBrowserContext() { 410 MockBrowserContext() {
411 content::BrowserContext::Initialize(this, base::FilePath()); 411 content::BrowserContext::Initialize(this, base::FilePath());
412 } 412 }
413 ~MockBrowserContext() {} 413 ~MockBrowserContext() {}
414 414
415 MOCK_CONST_METHOD0(GetPath, base::FilePath()); 415 MOCK_CONST_METHOD0(GetPath, base::FilePath());
416 MOCK_METHOD1(CreateZoomLevelDelegateMock, 416 MOCK_METHOD1(CreateZoomLevelDelegateMock,
417 ZoomLevelDelegate*(const base::FilePath&)); 417 ZoomLevelDelegate*(const base::FilePath&));
418 MOCK_CONST_METHOD0(IsOffTheRecord, bool()); 418 MOCK_CONST_METHOD0(IsOffTheRecord, bool());
419 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*());
419 MOCK_METHOD0(GetMediaRequestContext, 420 MOCK_METHOD0(GetMediaRequestContext,
420 net::URLRequestContextGetter*()); 421 net::URLRequestContextGetter*());
421 MOCK_METHOD1(GetMediaRequestContextForRenderProcess, 422 MOCK_METHOD1(GetMediaRequestContextForRenderProcess,
422 net::URLRequestContextGetter*(int renderer_child_id)); 423 net::URLRequestContextGetter*(int renderer_child_id));
423 MOCK_METHOD2(GetMediaRequestContextForStoragePartition, 424 MOCK_METHOD2(GetMediaRequestContextForStoragePartition,
424 net::URLRequestContextGetter*( 425 net::URLRequestContextGetter*(
425 const base::FilePath& partition_path, bool in_memory)); 426 const base::FilePath& partition_path, bool in_memory));
426 MOCK_METHOD0(GetResourceContext, ResourceContext*()); 427 MOCK_METHOD0(GetResourceContext, ResourceContext*());
427 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*()); 428 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*());
428 MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ()); 429 MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ());
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0); 794 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0);
794 795
795 base::Callback<bool(const GURL&)> url_filter = 796 base::Callback<bool(const GURL&)> url_filter =
796 GetSingleURLFilter(download_urls_[0]); 797 GetSingleURLFilter(download_urls_[0]);
797 int remove_count = download_manager_->RemoveDownloadsByURLAndTime( 798 int remove_count = download_manager_->RemoveDownloadsByURLAndTime(
798 url_filter, base::Time(), base::Time::Max()); 799 url_filter, base::Time(), base::Time::Max());
799 EXPECT_EQ(remove_count, 1); 800 EXPECT_EQ(remove_count, 1);
800 } 801 }
801 802
802 } // namespace content 803 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698