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

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

Issue 8589001: Load mac sandbox definitions from resources instead of the bundle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 1 month 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
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"
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/string_split.h" 13 #include "base/string_split.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "base/win/windows_version.h" 16 #include "base/win/windows_version.h"
17 #include "chrome/common/child_process_logging.h" 17 #include "chrome/common/child_process_logging.h"
18 #include "chrome/common/chrome_paths.h" 18 #include "chrome/common/chrome_paths.h"
19 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/chrome_version_info.h" 20 #include "chrome/common/chrome_version_info.h"
21 #include "chrome/common/render_messages.h" 21 #include "chrome/common/render_messages.h"
22 #include "chrome/default_plugin/plugin_main.h" 22 #include "chrome/default_plugin/plugin_main.h"
23 #include "content/public/common/pepper_plugin_info.h" 23 #include "content/public/common/pepper_plugin_info.h"
24 #include "grit/common_resources.h"
24 #include "remoting/client/plugin/pepper_entrypoints.h" 25 #include "remoting/client/plugin/pepper_entrypoints.h"
25 #include "ui/base/l10n/l10n_util.h" 26 #include "ui/base/l10n/l10n_util.h"
26 #include "ui/base/resource/resource_bundle.h" 27 #include "ui/base/resource/resource_bundle.h"
27 #include "webkit/glue/user_agent.h" 28 #include "webkit/glue/user_agent.h"
28 #include "webkit/plugins/npapi/plugin_list.h" 29 #include "webkit/plugins/npapi/plugin_list.h"
29 #include "webkit/plugins/plugin_constants.h" 30 #include "webkit/plugins/plugin_constants.h"
30 31
31 #if defined(OS_WIN) 32 #if defined(OS_WIN)
32 #include "sandbox/src/sandbox.h" 33 #include "sandbox/src/sandbox.h"
34 #elif defined(OS_MACOSX)
35 #include "chrome/common/chrome_sandbox_type_mac.h"
33 #endif 36 #endif
34 37
35 namespace { 38 namespace {
36 39
37 const char kPDFPluginName[] = "Chrome PDF Viewer"; 40 const char kPDFPluginName[] = "Chrome PDF Viewer";
38 const char kPDFPluginMimeType[] = "application/pdf"; 41 const char kPDFPluginMimeType[] = "application/pdf";
39 const char kPDFPluginExtension[] = "pdf"; 42 const char kPDFPluginExtension[] = "pdf";
40 const char kPDFPluginDescription[] = "Portable Document Format"; 43 const char kPDFPluginDescription[] = "Portable Document Format";
41 const char kPDFPluginPrintPreviewMimeType 44 const char kPDFPluginPrintPreviewMimeType
42 [] = "application/x-google-chrome-print-preview-pdf"; 45 [] = "application/x-google-chrome-print-preview-pdf";
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 DLOG(WARNING) << "Failed to start flash broker"; 395 DLOG(WARNING) << "Failed to start flash broker";
393 policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0); 396 policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0);
394 policy->SetTokenLevel( 397 policy->SetTokenLevel(
395 sandbox::USER_UNPROTECTED, sandbox::USER_UNPROTECTED); 398 sandbox::USER_UNPROTECTED, sandbox::USER_UNPROTECTED);
396 } 399 }
397 400
398 return true; 401 return true;
399 } 402 }
400 #endif 403 #endif
401 404
405 #if defined(OS_MACOSX)
406 int ChromeContentClient::GetSandboxProfileForSandboxType(
407 int sandbox_type) const {
408 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER)
409 return IDR_NACL_SANDBOX_PROFILE;
410 return -1;
411 }
412 #endif
413
402 } // namespace chrome 414 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698