OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 if (result != sandbox::SBOX_ALL_OK) { | 319 if (result != sandbox::SBOX_ALL_OK) { |
320 NOTREACHED(); | 320 NOTREACHED(); |
321 return false; | 321 return false; |
322 } | 322 } |
323 | 323 |
324 // Spawn the flash broker and apply sandbox policy. | 324 // Spawn the flash broker and apply sandbox policy. |
325 if (LoadFlashBroker(plugin_path, command_line)) { | 325 if (LoadFlashBroker(plugin_path, command_line)) { |
326 policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0); | 326 policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0); |
327 policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS, | 327 policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS, |
328 sandbox::USER_INTERACTIVE); | 328 sandbox::USER_INTERACTIVE); |
329 policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW); | 329 policy->SetIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW); |
330 } else { | 330 } else { |
331 // Could not start the broker, use a very weak policy instead. | 331 // Could not start the broker, use a very weak policy instead. |
332 DLOG(WARNING) << "Failed to start flash broker"; | 332 DLOG(WARNING) << "Failed to start flash broker"; |
333 policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0); | 333 policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0); |
334 policy->SetTokenLevel( | 334 policy->SetTokenLevel( |
335 sandbox::USER_UNPROTECTED, sandbox::USER_UNPROTECTED); | 335 sandbox::USER_UNPROTECTED, sandbox::USER_UNPROTECTED); |
336 } | 336 } |
337 | 337 |
338 return true; | 338 return true; |
339 } | 339 } |
340 #endif | 340 #endif |
341 | 341 |
342 } // namespace chrome | 342 } // namespace chrome |
OLD | NEW |