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/public/test/test_browser_context.h" | 5 #include "content/public/test/test_browser_context.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/test/null_task_runner.h" | 10 #include "base/test/null_task_runner.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } // namespace | 43 } // namespace |
44 | 44 |
45 namespace content { | 45 namespace content { |
46 | 46 |
47 TestBrowserContext::TestBrowserContext() { | 47 TestBrowserContext::TestBrowserContext() { |
48 EXPECT_TRUE(browser_context_dir_.CreateUniqueTempDir()); | 48 EXPECT_TRUE(browser_context_dir_.CreateUniqueTempDir()); |
49 BrowserContext::Initialize(this, browser_context_dir_.path()); | 49 BrowserContext::Initialize(this, browser_context_dir_.path()); |
50 } | 50 } |
51 | 51 |
52 TestBrowserContext::~TestBrowserContext() { | 52 TestBrowserContext::~TestBrowserContext() { |
| 53 ShutdownStoragePartitions(); |
53 } | 54 } |
54 | 55 |
55 base::FilePath TestBrowserContext::TakePath() { | 56 base::FilePath TestBrowserContext::TakePath() { |
56 return browser_context_dir_.Take(); | 57 return browser_context_dir_.Take(); |
57 } | 58 } |
58 | 59 |
59 void TestBrowserContext::SetSpecialStoragePolicy( | 60 void TestBrowserContext::SetSpecialStoragePolicy( |
60 storage::SpecialStoragePolicy* policy) { | 61 storage::SpecialStoragePolicy* policy) { |
61 special_storage_policy_ = policy; | 62 special_storage_policy_ = policy; |
62 } | 63 } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 } | 147 } |
147 | 148 |
148 net::URLRequestContextGetter* | 149 net::URLRequestContextGetter* |
149 TestBrowserContext::CreateMediaRequestContextForStoragePartition( | 150 TestBrowserContext::CreateMediaRequestContextForStoragePartition( |
150 const base::FilePath& partition_path, | 151 const base::FilePath& partition_path, |
151 bool in_memory) { | 152 bool in_memory) { |
152 return NULL; | 153 return NULL; |
153 } | 154 } |
154 | 155 |
155 } // namespace content | 156 } // namespace content |
OLD | NEW |