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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 7054068: Make sandboxed Flash work under UIPI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/plugin_process_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698