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

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

Issue 1741953002: mojo: Sketch a profile application. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't add a boolean to BrowserContext; allocate an object instead. Created 4 years, 9 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
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 "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 27 matching lines...) Expand all
38 net::TestURLRequestContext context_; 38 net::TestURLRequestContext context_;
39 scoped_refptr<base::SingleThreadTaskRunner> null_task_runner_; 39 scoped_refptr<base::SingleThreadTaskRunner> null_task_runner_;
40 }; 40 };
41 41
42 } // namespace 42 } // namespace
43 43
44 namespace content { 44 namespace content {
45 45
46 TestBrowserContext::TestBrowserContext() { 46 TestBrowserContext::TestBrowserContext() {
47 EXPECT_TRUE(browser_context_dir_.CreateUniqueTempDir()); 47 EXPECT_TRUE(browser_context_dir_.CreateUniqueTempDir());
48 BrowserContext::Initialize(this, browser_context_dir_.path());
48 } 49 }
49 50
50 TestBrowserContext::~TestBrowserContext() { 51 TestBrowserContext::~TestBrowserContext() {
51 } 52 }
52 53
53 base::FilePath TestBrowserContext::TakePath() { 54 base::FilePath TestBrowserContext::TakePath() {
54 return browser_context_dir_.Take(); 55 return browser_context_dir_.Take();
55 } 56 }
56 57
57 void TestBrowserContext::SetSpecialStoragePolicy( 58 void TestBrowserContext::SetSpecialStoragePolicy(
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 139 }
139 140
140 BackgroundSyncController* TestBrowserContext::GetBackgroundSyncController() { 141 BackgroundSyncController* TestBrowserContext::GetBackgroundSyncController() {
141 if (!background_sync_controller_) 142 if (!background_sync_controller_)
142 background_sync_controller_.reset(new MockBackgroundSyncController()); 143 background_sync_controller_.reset(new MockBackgroundSyncController());
143 144
144 return background_sync_controller_.get(); 145 return background_sync_controller_.get();
145 } 146 }
146 147
147 } // namespace content 148 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/browser_context.h ('k') | content/shell/browser/shell_browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698