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

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

Issue 1864583006: Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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*());
420 MOCK_METHOD0(GetMediaRequestContext, 419 MOCK_METHOD0(GetMediaRequestContext,
421 net::URLRequestContextGetter*()); 420 net::URLRequestContextGetter*());
422 MOCK_METHOD1(GetMediaRequestContextForRenderProcess, 421 MOCK_METHOD1(GetMediaRequestContextForRenderProcess,
423 net::URLRequestContextGetter*(int renderer_child_id)); 422 net::URLRequestContextGetter*(int renderer_child_id));
424 MOCK_METHOD2(GetMediaRequestContextForStoragePartition, 423 MOCK_METHOD2(GetMediaRequestContextForStoragePartition,
425 net::URLRequestContextGetter*( 424 net::URLRequestContextGetter*(
426 const base::FilePath& partition_path, bool in_memory)); 425 const base::FilePath& partition_path, bool in_memory));
427 MOCK_METHOD0(GetResourceContext, ResourceContext*()); 426 MOCK_METHOD0(GetResourceContext, ResourceContext*());
428 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*()); 427 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*());
429 MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ()); 428 MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ());
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0); 793 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0);
795 794
796 base::Callback<bool(const GURL&)> url_filter = 795 base::Callback<bool(const GURL&)> url_filter =
797 GetSingleURLFilter(download_urls_[0]); 796 GetSingleURLFilter(download_urls_[0]);
798 int remove_count = download_manager_->RemoveDownloadsByURLAndTime( 797 int remove_count = download_manager_->RemoveDownloadsByURLAndTime(
799 url_filter, base::Time(), base::Time::Max()); 798 url_filter, base::Time(), base::Time::Max());
800 EXPECT_EQ(remove_count, 1); 799 EXPECT_EQ(remove_count, 1);
801 } 800 }
802 801
803 } // namespace content 802 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698