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

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

Issue 1737933002: mojo leveldb: Get profile and leveldb connected to DOMStorageContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cast. 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/content_browser_test.h" 5 #include "content/public/test/content_browser_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "content/public/browser/browser_context.h"
13 #include "content/public/browser/render_process_host.h" 14 #include "content/public/browser/render_process_host.h"
14 #include "content/public/common/content_paths.h" 15 #include "content/public/common/content_paths.h"
15 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
16 #include "content/public/common/url_constants.h" 17 #include "content/public/common/url_constants.h"
17 #include "content/shell/browser/shell.h" 18 #include "content/shell/browser/shell.h"
18 #include "content/shell/browser/shell_browser_context.h" 19 #include "content/shell/browser/shell_browser_context.h"
19 #include "content/shell/browser/shell_content_browser_client.h" 20 #include "content/shell/browser/shell_content_browser_client.h"
20 #include "content/shell/common/shell_switches.h" 21 #include "content/shell/common/shell_switches.h"
21 #include "content/shell/renderer/layout_test/layout_test_content_renderer_client .h" 22 #include "content/shell/renderer/layout_test/layout_test_content_renderer_client .h"
22 #include "content/test/test_content_client.h" 23 #include "content/test/test_content_client.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 #endif 141 #endif
141 142
142 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); 143 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
143 !i.IsAtEnd(); i.Advance()) { 144 !i.IsAtEnd(); i.Advance()) {
144 i.GetCurrentValue()->FastShutdownIfPossible(); 145 i.GetCurrentValue()->FastShutdownIfPossible();
145 } 146 }
146 147
147 Shell::CloseAllWindows(); 148 Shell::CloseAllWindows();
148 } 149 }
149 150
151 BrowserContext* ContentBrowserTest::GetBrowserContext() const {
152 return ShellContentBrowserClient::Get()->browser_context();
153 }
154
150 Shell* ContentBrowserTest::CreateBrowser() { 155 Shell* ContentBrowserTest::CreateBrowser() {
151 return Shell::CreateNewWindow( 156 return Shell::CreateNewWindow(
152 ShellContentBrowserClient::Get()->browser_context(), 157 ShellContentBrowserClient::Get()->browser_context(),
153 GURL(url::kAboutBlankURL), 158 GURL(url::kAboutBlankURL),
154 NULL, 159 NULL,
155 gfx::Size()); 160 gfx::Size());
156 } 161 }
157 162
158 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() { 163 Shell* ContentBrowserTest::CreateOffTheRecordBrowser() {
159 return Shell::CreateNewWindow( 164 return Shell::CreateNewWindow(
160 ShellContentBrowserClient::Get()->off_the_record_browser_context(), 165 ShellContentBrowserClient::Get()->off_the_record_browser_context(),
161 GURL(url::kAboutBlankURL), 166 GURL(url::kAboutBlankURL),
162 NULL, 167 NULL,
163 gfx::Size()); 168 gfx::Size());
164 } 169 }
165 170
166 } // namespace content 171 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698