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

Side by Side Diff: content/test/test_browser_context.cc

Issue 10826311: Move the corresponding cc files from content\test to be alongside their headers in content\public\t… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/test/render_widget_browsertest.cc ('k') | content/test/test_browser_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/public/test/test_browser_context.h"
6
7 #include "base/file_path.h"
8 #include "content/public/test/mock_resource_context.h"
9 #include "net/url_request/url_request_context.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "webkit/quota/special_storage_policy.h"
12
13 namespace content {
14
15 TestBrowserContext::TestBrowserContext() {
16 EXPECT_TRUE(browser_context_dir_.CreateUniqueTempDir());
17 }
18
19 TestBrowserContext::~TestBrowserContext() {
20 }
21
22 FilePath TestBrowserContext::TakePath() {
23 return browser_context_dir_.Take();
24 }
25
26 void TestBrowserContext::SetSpecialStoragePolicy(
27 quota::SpecialStoragePolicy* policy) {
28 special_storage_policy_ = policy;
29 }
30
31 FilePath TestBrowserContext::GetPath() {
32 return browser_context_dir_.path();
33 }
34
35 bool TestBrowserContext::IsOffTheRecord() const {
36 return false;
37 }
38
39 DownloadManagerDelegate* TestBrowserContext::GetDownloadManagerDelegate() {
40 return NULL;
41 }
42
43 net::URLRequestContextGetter* TestBrowserContext::GetRequestContext() {
44 return NULL;
45 }
46
47 net::URLRequestContextGetter*
48 TestBrowserContext::GetRequestContextForRenderProcess(int renderer_child_id) {
49 return NULL;
50 }
51
52 net::URLRequestContextGetter* TestBrowserContext::GetRequestContextForMedia() {
53 return NULL;
54 }
55
56 ResourceContext* TestBrowserContext::GetResourceContext() {
57 if (!resource_context_.get())
58 resource_context_.reset(new MockResourceContext());
59 return resource_context_.get();
60 }
61
62 GeolocationPermissionContext*
63 TestBrowserContext::GetGeolocationPermissionContext() {
64 return NULL;
65 }
66
67 SpeechRecognitionPreferences*
68 TestBrowserContext::GetSpeechRecognitionPreferences() {
69 return NULL;
70 }
71
72 bool TestBrowserContext::DidLastSessionExitCleanly() {
73 return true;
74 }
75
76 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() {
77 return special_storage_policy_.get();
78 }
79
80 } // namespace content
OLDNEW
« no previous file with comments | « content/test/render_widget_browsertest.cc ('k') | content/test/test_browser_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698