| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/sandbox_policy.h" | 5 #include "chrome/browser/sandbox_policy.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/registry.h" | 10 #include "base/registry.h" |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 if (!AddDirectoryAndChildren(base::DIR_LOCAL_APP_DATA, NULL, | 275 if (!AddDirectoryAndChildren(base::DIR_LOCAL_APP_DATA, NULL, |
| 276 sandbox::TargetPolicy::FILES_ALLOW_READONLY, | 276 sandbox::TargetPolicy::FILES_ALLOW_READONLY, |
| 277 policy)) | 277 policy)) |
| 278 return false; | 278 return false; |
| 279 | 279 |
| 280 if (!AddKeyAndSubkeys(L"HKEY_CURRENT_USER\\SOFTWARE\\MACROMEDIA", | 280 if (!AddKeyAndSubkeys(L"HKEY_CURRENT_USER\\SOFTWARE\\MACROMEDIA", |
| 281 sandbox::TargetPolicy::REG_ALLOW_ANY, | 281 sandbox::TargetPolicy::REG_ALLOW_ANY, |
| 282 policy)) | 282 policy)) |
| 283 return false; | 283 return false; |
| 284 | 284 |
| 285 if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA) { | 285 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { |
| 286 if (!AddKeyAndSubkeys(L"HKEY_CURRENT_USER\\SOFTWARE\\AppDataLow", | 286 if (!AddKeyAndSubkeys(L"HKEY_CURRENT_USER\\SOFTWARE\\AppDataLow", |
| 287 sandbox::TargetPolicy::REG_ALLOW_ANY, | 287 sandbox::TargetPolicy::REG_ALLOW_ANY, |
| 288 policy)) | 288 policy)) |
| 289 return false; | 289 return false; |
| 290 | 290 |
| 291 if (!AddDirectoryAndChildren(base::DIR_LOCAL_APP_DATA_LOW, NULL, | 291 if (!AddDirectoryAndChildren(base::DIR_LOCAL_APP_DATA_LOW, NULL, |
| 292 sandbox::TargetPolicy::FILES_ALLOW_ANY, | 292 sandbox::TargetPolicy::FILES_ALLOW_ANY, |
| 293 policy)) | 293 policy)) |
| 294 return false; | 294 return false; |
| 295 } | 295 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 319 return ApplyPolicyForTrustedPlugin(policy); | 319 return ApplyPolicyForTrustedPlugin(policy); |
| 320 case PLUGIN_GROUP_UNTRUSTED: | 320 case PLUGIN_GROUP_UNTRUSTED: |
| 321 return ApplyPolicyForUntrustedPlugin(policy); | 321 return ApplyPolicyForUntrustedPlugin(policy); |
| 322 default: | 322 default: |
| 323 NOTREACHED(); | 323 NOTREACHED(); |
| 324 break; | 324 break; |
| 325 } | 325 } |
| 326 | 326 |
| 327 return false; | 327 return false; |
| 328 } | 328 } |
| OLD | NEW |