OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "android_webview/renderer/aw_content_renderer_client.h" | 5 #include "android_webview/renderer/aw_content_renderer_client.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "android_webview/common/aw_resource.h" | 9 #include "android_webview/common/aw_resource.h" |
10 #include "android_webview/common/aw_switches.h" | 10 #include "android_webview/common/aw_switches.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 replacements.push_back(""); | 224 replacements.push_back(""); |
225 *error_html = base::ReplaceStringPlaceholders( | 225 *error_html = base::ReplaceStringPlaceholders( |
226 ResourceBundle::GetSharedInstance().GetRawDataResource( | 226 ResourceBundle::GetSharedInstance().GetRawDataResource( |
227 IDR_AW_LOAD_ERROR_HTML), | 227 IDR_AW_LOAD_ERROR_HTML), |
228 replacements, nullptr); | 228 replacements, nullptr); |
229 if (error.reason == net::ERR_BLOCKED_BY_ADMINISTRATOR) { | 229 if (error.reason == net::ERR_BLOCKED_BY_ADMINISTRATOR) { |
230 // This needs more information | 230 // This needs more information |
231 render_frame->GetRemoteInterfaces()->GetInterface( | 231 render_frame->GetRemoteInterfaces()->GetInterface( |
232 &web_restrictions_service_); | 232 &web_restrictions_service_); |
233 web_restrictions::mojom::ClientResultPtr result; | 233 web_restrictions::mojom::ClientResultPtr result; |
234 if (web_restrictions_service_->GetResult(mojo::String(url), &result)) { | 234 if (web_restrictions_service_->GetResult(url, &result)) { |
235 std::string detailed_error_html = | 235 std::string detailed_error_html = |
236 supervised_user_error_page::BuildHtmlFromWebRestrictionsResult( | 236 supervised_user_error_page::BuildHtmlFromWebRestrictionsResult( |
237 result, RenderThread::Get()->GetLocale()); | 237 result, RenderThread::Get()->GetLocale()); |
238 if (!detailed_error_html.empty()) { | 238 if (!detailed_error_html.empty()) { |
239 *error_html = detailed_error_html; | 239 *error_html = detailed_error_html; |
240 supervised_user_error_page::GinWrapper::InstallWhenFrameReady( | 240 supervised_user_error_page::GinWrapper::InstallWhenFrameReady( |
241 render_frame, url, web_restrictions_service_); | 241 render_frame, url, web_restrictions_service_); |
242 } | 242 } |
243 } | 243 } |
244 } | 244 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 for (auto* extension : kMediaPlayerExtensions) { | 283 for (auto* extension : kMediaPlayerExtensions) { |
284 if (base::EndsWith(url.path(), extension, | 284 if (base::EndsWith(url.path(), extension, |
285 base::CompareCase::INSENSITIVE_ASCII)) { | 285 base::CompareCase::INSENSITIVE_ASCII)) { |
286 return true; | 286 return true; |
287 } | 287 } |
288 } | 288 } |
289 return false; | 289 return false; |
290 } | 290 } |
291 | 291 |
292 } // namespace android_webview | 292 } // namespace android_webview |
OLD | NEW |