OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef COMPONENTS_SUPERVISED_USER_ERROR_PAGE_SUPERVISED_USER_ERROR_PAGE_H_ | 5 #ifndef COMPONENTS_SUPERVISED_USER_ERROR_PAGE_SUPERVISED_USER_ERROR_PAGE_H_ |
6 #define COMPONENTS_SUPERVISED_USER_ERROR_PAGE_SUPERVISED_USER_ERROR_PAGE_H_ | 6 #define COMPONENTS_SUPERVISED_USER_ERROR_PAGE_SUPERVISED_USER_ERROR_PAGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace supervised_user_error_page { | 10 namespace supervised_user_error_page { |
11 | 11 |
12 // Note: values need to be explicit, since NOT_SIGNED_IN is also | |
13 // detected in Java (SupervisedUserContentProvider.java) and the value | |
14 // needs to match. | |
Bernhard Bauer
2017/02/15 15:09:38
We can actually create a Java enum (well, @IntDef)
aberent
2017/02/15 18:34:46
Done.
| |
12 enum FilteringBehaviorReason { | 15 enum FilteringBehaviorReason { |
13 DEFAULT, | 16 DEFAULT = 0, |
14 ASYNC_CHECKER, | 17 ASYNC_CHECKER = 1, |
15 BLACKLIST, | 18 BLACKLIST = 2, |
16 MANUAL, | 19 MANUAL = 3, |
17 WHITELIST | 20 WHITELIST = 4, |
21 NOT_SIGNED_IN = 5, | |
18 }; | 22 }; |
19 | 23 |
20 int GetBlockMessageID( | 24 int GetBlockMessageID( |
21 supervised_user_error_page::FilteringBehaviorReason reason, | 25 supervised_user_error_page::FilteringBehaviorReason reason, |
22 bool is_child_account, | 26 bool is_child_account, |
23 bool single_parent); | 27 bool single_parent); |
24 | 28 |
25 std::string BuildHtml(bool allow_access_requests, | 29 std::string BuildHtml(bool allow_access_requests, |
26 const std::string& profile_image_url, | 30 const std::string& profile_image_url, |
27 const std::string& profile_image_url2, | 31 const std::string& profile_image_url2, |
28 const std::string& custodian, | 32 const std::string& custodian, |
29 const std::string& custodian_email, | 33 const std::string& custodian_email, |
30 const std::string& second_custodian, | 34 const std::string& second_custodian, |
31 const std::string& second_custodian_email, | 35 const std::string& second_custodian_email, |
32 bool is_child_account, | 36 bool is_child_account, |
33 FilteringBehaviorReason reason, | 37 FilteringBehaviorReason reason, |
34 const std::string& app_locale); | 38 const std::string& app_locale); |
35 | 39 |
36 } // namespace supervised_user_error_page | 40 } // namespace supervised_user_error_page |
37 | 41 |
38 #endif // COMPONENTS_SUPERVISED_USER_ERROR_PAGE_SUPERVISED_USER_ERROR_PAGE_H_ | 42 #endif // COMPONENTS_SUPERVISED_USER_ERROR_PAGE_SUPERVISED_USER_ERROR_PAGE_H_ |
OLD | NEW |