| 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 <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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 MOCK_CONST_METHOD0(IsOffTheRecord, bool()); | 377 MOCK_CONST_METHOD0(IsOffTheRecord, bool()); |
| 378 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*()); | 378 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*()); |
| 379 MOCK_METHOD1(GetRequestContextForRenderProcess, | 379 MOCK_METHOD1(GetRequestContextForRenderProcess, |
| 380 net::URLRequestContextGetter*(int renderer_child_id)); | 380 net::URLRequestContextGetter*(int renderer_child_id)); |
| 381 MOCK_METHOD1(GetRequestContextForStoragePartition, | 381 MOCK_METHOD1(GetRequestContextForStoragePartition, |
| 382 net::URLRequestContextGetter*(const std::string& id)); | 382 net::URLRequestContextGetter*(const std::string& id)); |
| 383 MOCK_METHOD0(GetMediaRequestContext, | 383 MOCK_METHOD0(GetMediaRequestContext, |
| 384 net::URLRequestContextGetter*()); | 384 net::URLRequestContextGetter*()); |
| 385 MOCK_METHOD1(GetMediaRequestContextForRenderProcess, | 385 MOCK_METHOD1(GetMediaRequestContextForRenderProcess, |
| 386 net::URLRequestContextGetter*(int renderer_child_id)); | 386 net::URLRequestContextGetter*(int renderer_child_id)); |
| 387 MOCK_METHOD1(GetMediaRequestContextForStoragePartition, |
| 388 net::URLRequestContextGetter*(const std::string& id)); |
| 387 MOCK_METHOD0(GetResourceContext, content::ResourceContext*()); | 389 MOCK_METHOD0(GetResourceContext, content::ResourceContext*()); |
| 388 MOCK_METHOD0(GetDownloadManagerDelegate, content::DownloadManagerDelegate*()); | 390 MOCK_METHOD0(GetDownloadManagerDelegate, content::DownloadManagerDelegate*()); |
| 389 MOCK_METHOD0(GetGeolocationPermissionContext, | 391 MOCK_METHOD0(GetGeolocationPermissionContext, |
| 390 content::GeolocationPermissionContext* ()); | 392 content::GeolocationPermissionContext* ()); |
| 391 MOCK_METHOD0(GetSpeechRecognitionPreferences, | 393 MOCK_METHOD0(GetSpeechRecognitionPreferences, |
| 392 content::SpeechRecognitionPreferences* ()); | 394 content::SpeechRecognitionPreferences* ()); |
| 393 MOCK_METHOD0(DidLastSessionExitCleanly, bool()); | 395 MOCK_METHOD0(DidLastSessionExitCleanly, bool()); |
| 394 MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*()); | 396 MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*()); |
| 395 }; | 397 }; |
| 396 | 398 |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 UpdateItemInPersistentStore(&item)); | 662 UpdateItemInPersistentStore(&item)); |
| 661 EXPECT_CALL(item, GetState()) | 663 EXPECT_CALL(item, GetState()) |
| 662 .WillRepeatedly(Return(DownloadItem::CANCELLED)); | 664 .WillRepeatedly(Return(DownloadItem::CANCELLED)); |
| 663 EXPECT_CALL(item, GetDbHandle()) | 665 EXPECT_CALL(item, GetDbHandle()) |
| 664 .WillRepeatedly(Return(db_handle)); | 666 .WillRepeatedly(Return(db_handle)); |
| 665 | 667 |
| 666 EXPECT_CALL(item, OffThreadCancel()); | 668 EXPECT_CALL(item, OffThreadCancel()); |
| 667 DownloadStopped(&item); | 669 DownloadStopped(&item); |
| 668 EXPECT_EQ(NULL, download_manager_->GetActiveDownloadItem(download_id)); | 670 EXPECT_EQ(NULL, download_manager_->GetActiveDownloadItem(download_id)); |
| 669 } | 671 } |
| OLD | NEW |