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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 136473004: Move kExtensionProcess to src/extensions/common/switches.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix app_shell (switches) Created 6 years, 11 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 | « apps/shell/shell_content_browser_client.cc ('k') | chrome/common/chrome_switches.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 ANNOTATE_SCOPED_MEMORY_LEAK; 496 ANNOTATE_SCOPED_MEMORY_LEAK;
497 breakpad::CrashHandlerHostLinux* crash_handler = 497 breakpad::CrashHandlerHostLinux* crash_handler =
498 new breakpad::CrashHandlerHostLinux( 498 new breakpad::CrashHandlerHostLinux(
499 process_type, dumps_path, getenv(env_vars::kHeadless) == NULL); 499 process_type, dumps_path, getenv(env_vars::kHeadless) == NULL);
500 crash_handler->StartUploaderThread(); 500 crash_handler->StartUploaderThread();
501 return crash_handler; 501 return crash_handler;
502 } 502 }
503 } 503 }
504 504
505 int GetCrashSignalFD(const CommandLine& command_line) { 505 int GetCrashSignalFD(const CommandLine& command_line) {
506 if (command_line.HasSwitch(switches::kExtensionProcess)) { 506 if (command_line.HasSwitch(extensions::switches::kExtensionProcess)) {
507 static breakpad::CrashHandlerHostLinux* crash_handler = NULL; 507 static breakpad::CrashHandlerHostLinux* crash_handler = NULL;
508 if (!crash_handler) 508 if (!crash_handler)
509 crash_handler = CreateCrashHandlerHost("extension"); 509 crash_handler = CreateCrashHandlerHost("extension");
510 return crash_handler->GetDeathSignalSocket(); 510 return crash_handler->GetDeathSignalSocket();
511 } 511 }
512 512
513 std::string process_type = 513 std::string process_type =
514 command_line.GetSwitchValueASCII(switches::kProcessType); 514 command_line.GetSwitchValueASCII(switches::kProcessType);
515 515
516 if (process_type == switches::kRendererProcess) { 516 if (process_type == switches::kRendererProcess) {
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 content::RenderProcessHost* process = 1452 content::RenderProcessHost* process =
1453 content::RenderProcessHost::FromID(child_process_id); 1453 content::RenderProcessHost::FromID(child_process_id);
1454 if (process) { 1454 if (process) {
1455 Profile* profile = Profile::FromBrowserContext( 1455 Profile* profile = Profile::FromBrowserContext(
1456 process->GetBrowserContext()); 1456 process->GetBrowserContext());
1457 ExtensionService* extension_service = 1457 ExtensionService* extension_service =
1458 extensions::ExtensionSystem::Get(profile)->extension_service(); 1458 extensions::ExtensionSystem::Get(profile)->extension_service();
1459 if (extension_service) { 1459 if (extension_service) {
1460 extensions::ProcessMap* process_map = extension_service->process_map(); 1460 extensions::ProcessMap* process_map = extension_service->process_map();
1461 if (process_map && process_map->Contains(process->GetID())) 1461 if (process_map && process_map->Contains(process->GetID()))
1462 command_line->AppendSwitch(switches::kExtensionProcess); 1462 command_line->AppendSwitch(extensions::switches::kExtensionProcess);
1463 } 1463 }
1464 1464
1465 PrefService* prefs = profile->GetPrefs(); 1465 PrefService* prefs = profile->GetPrefs();
1466 // Currently this pref is only registered if applied via a policy. 1466 // Currently this pref is only registered if applied via a policy.
1467 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) && 1467 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) &&
1468 prefs->GetBoolean(prefs::kDisable3DAPIs)) { 1468 prefs->GetBoolean(prefs::kDisable3DAPIs)) {
1469 // Turn this policy into a command line switch. 1469 // Turn this policy into a command line switch.
1470 command_line->AppendSwitch(switches::kDisable3DAPIs); 1470 command_line->AppendSwitch(switches::kDisable3DAPIs);
1471 } 1471 }
1472 1472
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2655 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on 2655 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on
2656 // Chromium builds as well. 2656 // Chromium builds as well.
2657 return channel <= chrome::VersionInfo::CHANNEL_DEV; 2657 return channel <= chrome::VersionInfo::CHANNEL_DEV;
2658 #else 2658 #else
2659 return false; 2659 return false;
2660 #endif 2660 #endif
2661 } 2661 }
2662 2662
2663 2663
2664 } // namespace chrome 2664 } // namespace chrome
OLDNEW
« no previous file with comments | « apps/shell/shell_content_browser_client.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698