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

Side by Side Diff: content/shell/browser/layout_test/layout_test_browser_context.cc

Issue 641203004: Revert of Content Shell: Introduce LayoutTestBrowserContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
(Empty)
1 // Copyright 2014 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/shell/browser/layout_test/layout_test_browser_context.h"
6
7 #include "base/bind.h"
8 #include "base/command_line.h"
9 #include "base/files/file_util.h"
10 #include "base/logging.h"
11 #include "base/path_service.h"
12 #include "content/public/browser/resource_context.h"
13 #include "content/shell/browser/shell_download_manager_delegate.h"
14 #include "content/shell/browser/shell_url_request_context_getter.h"
15
16 #if defined(OS_WIN)
17 #include "base/base_paths_win.h"
18 #elif defined(OS_LINUX)
19 #include "base/nix/xdg_util.h"
20 #elif defined(OS_MACOSX)
21 #include "base/base_paths_mac.h"
22 #endif
23
24 namespace content {
25
26 LayoutTestBrowserContext::LayoutTestBrowserContext(bool off_the_record,
27 net::NetLog* net_log)
28 : ShellBrowserContext(off_the_record, net_log) {
29 }
30
31 LayoutTestBrowserContext::~LayoutTestBrowserContext() {
32 }
33
34 void LayoutTestBrowserContext::InitWhileIOAllowed() {
35 ignore_certificate_errors_ = true;
36 ShellBrowserContext::InitWhileIOAllowed();
37 }
38
39 DownloadManagerDelegate*
40 LayoutTestBrowserContext::GetDownloadManagerDelegate() {
41 if (!download_manager_delegate_.get()) {
42 download_manager_delegate_.reset(new ShellDownloadManagerDelegate());
43 download_manager_delegate_->SetDownloadManager(
44 BrowserContext::GetDownloadManager(this));
45 // TODO(mkwst): We can avoid this bit in the future by defining a
46 // LayoutTestDownloadManagerDelegate.
47 download_manager_delegate_->SetDownloadBehaviorForTesting(
48 GetPath().Append(FILE_PATH_LITERAL("downloads")));
49 }
50
51 return download_manager_delegate_.get();
52 }
53
54 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/layout_test_browser_context.h ('k') | content/shell/browser/shell_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698