Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Unified Diff: components/supervised_user_error_page/supervised_user_error_page_android.cc

Issue 1890203002: Implement Web Restrictions in WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments, and fix a possible race in displaying error page Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/supervised_user_error_page/supervised_user_error_page_android.cc
diff --git a/components/supervised_user_error_page/supervised_user_error_page_android.cc b/components/supervised_user_error_page/supervised_user_error_page_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..da5b04fed66f1d246bae49a856d815b2a48d3bb5
--- /dev/null
+++ b/components/supervised_user_error_page/supervised_user_error_page_android.cc
@@ -0,0 +1,28 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/supervised_user_error_page/supervised_user_error_page_android.h"
+
+#include "base/macros.h"
+#include "components/supervised_user_error_page/supervised_user_error_page.h"
+
+namespace supervised_user_error_page {
+
+std::string BuildHtmlFromWebRestrictionsResult(
+ const web_restrictions::mojom::ClientResultPtr& result,
+ const std::string app_locale) {
+ return BuildHtml(
+ result->intParams["Allow access requests"],
+ result->stringParams["Profile image URL"],
+ result->stringParams["Second profile image URL"],
+ result->stringParams["Custodian"],
+ result->stringParams["Custodian email"],
+ result->stringParams["Second custodian"],
+ result->stringParams["Second custodian email"],
+ result->intParams["Is child account"],
+ static_cast<FilteringBehaviorReason>(result->intParams["Reason"]),
+ app_locale);
+}
+
+} // namespace supervised_user_error_page

Powered by Google App Engine
This is Rietveld 408576698