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

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

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing Android's BrowserContext. Created 8 years, 1 month 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 | Annotate | Revision Log
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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 class MockBrowserContext : public BrowserContext { 369 class MockBrowserContext : public BrowserContext {
370 public: 370 public:
371 MockBrowserContext() {} 371 MockBrowserContext() {}
372 ~MockBrowserContext() {} 372 ~MockBrowserContext() {}
373 373
374 MOCK_METHOD0(GetPath, FilePath()); 374 MOCK_METHOD0(GetPath, FilePath());
375 MOCK_CONST_METHOD0(IsOffTheRecord, bool()); 375 MOCK_CONST_METHOD0(IsOffTheRecord, bool());
376 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*()); 376 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*());
377 MOCK_METHOD1(GetRequestContextForRenderProcess, 377 MOCK_METHOD1(GetRequestContextForRenderProcess,
378 net::URLRequestContextGetter*(int renderer_child_id)); 378 net::URLRequestContextGetter*(int renderer_child_id));
379 MOCK_METHOD1(GetRequestContextForStoragePartition, 379 MOCK_METHOD2(GetRequestContextForStoragePartition,
380 net::URLRequestContextGetter*(const std::string& id)); 380 net::URLRequestContextGetter*(
381 const FilePath& partition_path, bool in_memory));
381 MOCK_METHOD0(GetMediaRequestContext, 382 MOCK_METHOD0(GetMediaRequestContext,
382 net::URLRequestContextGetter*()); 383 net::URLRequestContextGetter*());
383 MOCK_METHOD1(GetMediaRequestContextForRenderProcess, 384 MOCK_METHOD1(GetMediaRequestContextForRenderProcess,
384 net::URLRequestContextGetter*(int renderer_child_id)); 385 net::URLRequestContextGetter*(int renderer_child_id));
385 MOCK_METHOD1(GetMediaRequestContextForStoragePartition, 386 MOCK_METHOD2(GetMediaRequestContextForStoragePartition,
386 net::URLRequestContextGetter*(const std::string& id)); 387 net::URLRequestContextGetter*(
388 const FilePath& partition_path, bool in_memory));
387 MOCK_METHOD0(GetResourceContext, ResourceContext*()); 389 MOCK_METHOD0(GetResourceContext, ResourceContext*());
388 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*()); 390 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*());
389 MOCK_METHOD0(GetGeolocationPermissionContext, 391 MOCK_METHOD0(GetGeolocationPermissionContext,
390 GeolocationPermissionContext* ()); 392 GeolocationPermissionContext* ());
391 MOCK_METHOD0(GetSpeechRecognitionPreferences, 393 MOCK_METHOD0(GetSpeechRecognitionPreferences,
392 SpeechRecognitionPreferences* ()); 394 SpeechRecognitionPreferences* ());
393 MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*()); 395 MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*());
394 }; 396 };
395 397
396 class MockDownloadManagerObserver : public DownloadManager::Observer { 398 class MockDownloadManagerObserver : public DownloadManager::Observer {
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 UpdateItemInPersistentStore(&item)); 690 UpdateItemInPersistentStore(&item));
689 EXPECT_CALL(item, GetState()) 691 EXPECT_CALL(item, GetState())
690 .WillRepeatedly(Return(DownloadItem::CANCELLED)); 692 .WillRepeatedly(Return(DownloadItem::CANCELLED));
691 EXPECT_CALL(item, GetDbHandle()) 693 EXPECT_CALL(item, GetDbHandle())
692 .WillRepeatedly(Return(db_handle)); 694 .WillRepeatedly(Return(db_handle));
693 695
694 DownloadStopped(&item); 696 DownloadStopped(&item);
695 } 697 }
696 698
697 } // namespace content 699 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698