| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "base/json/json_reader.h" | 5 #include "base/json/json_reader.h" |
| 6 #include "blimp/engine/app/blimp_browser_main_parts.h" | 6 #include "blimp/engine/app/blimp_browser_main_parts.h" |
| 7 #include "blimp/engine/app/blimp_content_browser_client.h" | 7 #include "blimp/engine/app/blimp_content_browser_client.h" |
| 8 #include "blimp/engine/app/settings_manager.h" | 8 #include "blimp/engine/app/settings_manager.h" |
| 9 #include "blimp/engine/grit/blimp_browser_resources.h" | 9 #include "blimp/engine/grit/blimp_browser_resources.h" |
| 10 #include "blimp/engine/mojo/blob_channel_service.h" | 10 #include "blimp/engine/mojo/blob_channel_service.h" |
| 11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "content/public/common/service_names.h" | 12 #include "content/public/common/service_names.h" |
| 13 #include "services/service_manager/public/cpp/interface_registry.h" | 13 #include "services/service_manager/public/cpp/interface_registry.h" |
| 14 #include "storage/browser/quota/quota_settings.h" |
| 14 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
| 15 | 16 |
| 16 namespace blimp { | 17 namespace blimp { |
| 17 namespace engine { | 18 namespace engine { |
| 18 | 19 |
| 19 BlimpContentBrowserClient::BlimpContentBrowserClient() {} | 20 BlimpContentBrowserClient::BlimpContentBrowserClient() {} |
| 20 | 21 |
| 21 BlimpContentBrowserClient::~BlimpContentBrowserClient() {} | 22 BlimpContentBrowserClient::~BlimpContentBrowserClient() {} |
| 22 | 23 |
| 23 content::BrowserMainParts* BlimpContentBrowserClient::CreateBrowserMainParts( | 24 content::BrowserMainParts* BlimpContentBrowserClient::CreateBrowserMainParts( |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } | 63 } |
| 63 if (id == -1) { | 64 if (id == -1) { |
| 64 return nullptr; | 65 return nullptr; |
| 65 } | 66 } |
| 66 | 67 |
| 67 base::StringPiece manifest_contents = | 68 base::StringPiece manifest_contents = |
| 68 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE); | 69 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE); |
| 69 return base::JSONReader::Read(manifest_contents); | 70 return base::JSONReader::Read(manifest_contents); |
| 70 } | 71 } |
| 71 | 72 |
| 73 void BlimpContentBrowserClient::GetQuotaSettings( |
| 74 content::BrowserContext* context, |
| 75 const base::FilePath& partition_path, |
| 76 bool is_incognito, |
| 77 const storage::OptionalQuotaSettingsCallback& callback) { |
| 78 content::BrowserThread::PostTaskAndReplyWithResult( |
| 79 content::BrowserThread::FILE, FROM_HERE, |
| 80 base::Bind(&storage::CalculateNominalDynamicSettings, partition_path, |
| 81 is_incognito), |
| 82 callback); |
| 83 } |
| 84 |
| 72 } // namespace engine | 85 } // namespace engine |
| 73 } // namespace blimp | 86 } // namespace blimp |
| OLD | NEW |