OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/profiles/incognito_mode_policy_handler.h" | 5 #include "chrome/browser/profiles/incognito_mode_policy_handler.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 10 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
12 #include "components/policy/core/browser/policy_error_map.h" | 12 #include "components/policy/core/browser/policy_error_map.h" |
13 #include "components/policy/core/common/policy_map.h" | 13 #include "components/policy/core/common/policy_map.h" |
14 #include "components/policy/policy_constants.h" | 14 #include "components/policy/policy_constants.h" |
15 #include "components/prefs/pref_value_map.h" | 15 #include "components/prefs/pref_value_map.h" |
16 #include "grit/components_strings.h" | 16 #include "components/strings/grit/components_strings.h" |
17 | 17 |
18 namespace policy { | 18 namespace policy { |
19 | 19 |
20 IncognitoModePolicyHandler::IncognitoModePolicyHandler() {} | 20 IncognitoModePolicyHandler::IncognitoModePolicyHandler() {} |
21 | 21 |
22 IncognitoModePolicyHandler::~IncognitoModePolicyHandler() {} | 22 IncognitoModePolicyHandler::~IncognitoModePolicyHandler() {} |
23 | 23 |
24 bool IncognitoModePolicyHandler::CheckPolicySettings(const PolicyMap& policies, | 24 bool IncognitoModePolicyHandler::CheckPolicySettings(const PolicyMap& policies, |
25 PolicyErrorMap* errors) { | 25 PolicyErrorMap* errors) { |
26 const base::Value* availability = | 26 const base::Value* availability = |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 prefs->SetInteger( | 79 prefs->SetInteger( |
80 prefs::kIncognitoModeAvailability, | 80 prefs::kIncognitoModeAvailability, |
81 enabled ? IncognitoModePrefs::ENABLED : IncognitoModePrefs::DISABLED); | 81 enabled ? IncognitoModePrefs::ENABLED : IncognitoModePrefs::DISABLED); |
82 } else { | 82 } else { |
83 NOTREACHED(); | 83 NOTREACHED(); |
84 } | 84 } |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
88 } // namespace policy | 88 } // namespace policy |
OLD | NEW |