Respond with QuotaExceededError when IndexedDB has no disk space on open.
[chromium-blink-merge.git] / content / test / test_content_browser_client.cc
blob7b9d3683aa87a683952c509f5fd7399786a2a7dc
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.
5 #include "content/test/test_content_browser_client.h"
7 #include <string>
9 #include "base/files/file_path.h"
10 #include "base/logging.h"
11 #include "content/test/test_web_contents_view.h"
13 namespace content {
15 TestContentBrowserClient::TestContentBrowserClient() {
18 TestContentBrowserClient::~TestContentBrowserClient() {
21 WebContentsViewPort* TestContentBrowserClient::OverrideCreateWebContentsView(
22 WebContents* web_contents,
23 RenderViewHostDelegateView** render_view_host_delegate_view) {
24 #if defined(OS_IOS)
25 return NULL;
26 #else
27 TestWebContentsView* rv = new TestWebContentsView;
28 *render_view_host_delegate_view = rv;
29 return rv;
30 #endif
33 base::FilePath TestContentBrowserClient::GetDefaultDownloadDirectory() {
34 if (!download_dir_.IsValid()) {
35 bool result = download_dir_.CreateUniqueTempDir();
36 CHECK(result);
38 return download_dir_.path();
41 } // namespace content