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/test/test_browser_context.h" | 5 #include "content/public/test/test_browser_context.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "content/public/test/mock_resource_context.h" | 8 #include "content/public/test/mock_resource_context.h" |
9 #include "net/url_request/url_request_context.h" | 9 #include "net/url_request/url_request_context.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "webkit/quota/special_storage_policy.h" | 11 #include "webkit/quota/special_storage_policy.h" |
12 | 12 |
13 using content::DownloadManager; | 13 namespace content { |
14 | 14 |
15 TestBrowserContext::TestBrowserContext() { | 15 TestBrowserContext::TestBrowserContext() { |
16 EXPECT_TRUE(browser_context_dir_.CreateUniqueTempDir()); | 16 EXPECT_TRUE(browser_context_dir_.CreateUniqueTempDir()); |
17 } | 17 } |
18 | 18 |
19 TestBrowserContext::~TestBrowserContext() { | 19 TestBrowserContext::~TestBrowserContext() { |
20 } | 20 } |
21 | 21 |
22 FilePath TestBrowserContext::TakePath() { | 22 FilePath TestBrowserContext::TakePath() { |
23 return browser_context_dir_.Take(); | 23 return browser_context_dir_.Take(); |
(...skipping 22 matching lines...) Expand all Loading... |
46 | 46 |
47 net::URLRequestContextGetter* | 47 net::URLRequestContextGetter* |
48 TestBrowserContext::GetRequestContextForRenderProcess(int renderer_child_id) { | 48 TestBrowserContext::GetRequestContextForRenderProcess(int renderer_child_id) { |
49 return NULL; | 49 return NULL; |
50 } | 50 } |
51 | 51 |
52 net::URLRequestContextGetter* TestBrowserContext::GetRequestContextForMedia() { | 52 net::URLRequestContextGetter* TestBrowserContext::GetRequestContextForMedia() { |
53 return NULL; | 53 return NULL; |
54 } | 54 } |
55 | 55 |
56 content::ResourceContext* TestBrowserContext::GetResourceContext() { | 56 ResourceContext* TestBrowserContext::GetResourceContext() { |
57 if (!resource_context_.get()) | 57 if (!resource_context_.get()) |
58 resource_context_.reset(new content::MockResourceContext()); | 58 resource_context_.reset(new MockResourceContext()); |
59 return resource_context_.get(); | 59 return resource_context_.get(); |
60 } | 60 } |
61 | 61 |
62 content::GeolocationPermissionContext* | 62 GeolocationPermissionContext* |
63 TestBrowserContext::GetGeolocationPermissionContext() { | 63 TestBrowserContext::GetGeolocationPermissionContext() { |
64 return NULL; | 64 return NULL; |
65 } | 65 } |
66 | 66 |
67 content::SpeechRecognitionPreferences* | 67 SpeechRecognitionPreferences* |
68 TestBrowserContext::GetSpeechRecognitionPreferences() { | 68 TestBrowserContext::GetSpeechRecognitionPreferences() { |
69 return NULL; | 69 return NULL; |
70 } | 70 } |
71 | 71 |
72 bool TestBrowserContext::DidLastSessionExitCleanly() { | 72 bool TestBrowserContext::DidLastSessionExitCleanly() { |
73 return true; | 73 return true; |
74 } | 74 } |
75 | 75 |
76 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() { | 76 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() { |
77 return special_storage_policy_.get(); | 77 return special_storage_policy_.get(); |
78 } | 78 } |
| 79 |
| 80 } // namespace content |
OLD | NEW |