OLD | NEW |
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 "ash/shell/content/client/shell_content_browser_client.h" | 5 #include "ash/shell/content/client/shell_content_browser_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/shell/content/client/shell_browser_main_parts.h" | 9 #include "ash/shell/content/client/shell_browser_main_parts.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "content/public/browser/browser_context.h" |
| 12 #include "content/public/browser/browser_thread.h" |
| 13 #include "content/public/browser/storage_partition.h" |
| 14 #include "storage/browser/quota/quota_settings.h" |
11 #include "third_party/skia/include/core/SkBitmap.h" | 15 #include "third_party/skia/include/core/SkBitmap.h" |
12 | 16 |
13 namespace ash { | 17 namespace ash { |
14 namespace shell { | 18 namespace shell { |
15 | 19 |
16 ShellContentBrowserClient::ShellContentBrowserClient() | 20 ShellContentBrowserClient::ShellContentBrowserClient() |
17 : shell_browser_main_parts_(nullptr) {} | 21 : shell_browser_main_parts_(nullptr) {} |
18 | 22 |
19 ShellContentBrowserClient::~ShellContentBrowserClient() {} | 23 ShellContentBrowserClient::~ShellContentBrowserClient() {} |
20 | 24 |
21 content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( | 25 content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( |
22 const content::MainFunctionParams& parameters) { | 26 const content::MainFunctionParams& parameters) { |
23 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); | 27 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); |
24 return shell_browser_main_parts_; | 28 return shell_browser_main_parts_; |
25 } | 29 } |
26 | 30 |
| 31 void ShellContentBrowserClient::GetQuotaSettings( |
| 32 content::BrowserContext* context, |
| 33 content::StoragePartition* partition, |
| 34 const storage::OptionalQuotaSettingsCallback& callback) { |
| 35 content::BrowserThread::PostTaskAndReplyWithResult( |
| 36 content::BrowserThread::FILE, FROM_HERE, |
| 37 base::Bind(&storage::CalculateNominalDynamicSettings, |
| 38 partition->GetPath(), context->IsOffTheRecord()), |
| 39 callback); |
| 40 } |
| 41 |
27 } // namespace examples | 42 } // namespace examples |
28 } // namespace views | 43 } // namespace views |
OLD | NEW |