Respond with QuotaExceededError when IndexedDB has no disk space on open.
[chromium-blink-merge.git] / content / app / content_main.cc
blobc82d7904da45b15f50a313c6b75dcab22bb6ce1a
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/public/app/content_main.h"
7 #include "base/memory/scoped_ptr.h"
8 #include "content/public/app/content_main_runner.h"
10 namespace content {
12 #if defined(OS_WIN)
13 int ContentMain(HINSTANCE instance,
14 sandbox::SandboxInterfaceInfo* sandbox_info,
15 ContentMainDelegate* delegate) {
16 #else
17 int ContentMain(int argc,
18 const char** argv,
19 ContentMainDelegate* delegate) {
20 #endif // OS_WIN
22 scoped_ptr<ContentMainRunner> main_runner(ContentMainRunner::Create());
24 int exit_code;
26 #if defined(OS_WIN)
27 exit_code = main_runner->Initialize(instance, sandbox_info, delegate);
28 #else
29 exit_code = main_runner->Initialize(argc, argv, delegate);
30 #endif // OS_WIN
32 if (exit_code >= 0)
33 return exit_code;
35 exit_code = main_runner->Run();
37 main_runner->Shutdown();
39 return exit_code;
42 } // namespace content