| OLD | NEW |
| 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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 browser_command_line.GetSwitchValueASCII(switches::kLoginProfile); | 778 browser_command_line.GetSwitchValueASCII(switches::kLoginProfile); |
| 779 if (!login_profile.empty()) | 779 if (!login_profile.empty()) |
| 780 command_line->AppendSwitchASCII(switches::kLoginProfile, login_profile); | 780 command_line->AppendSwitchASCII(switches::kLoginProfile, login_profile); |
| 781 #endif | 781 #endif |
| 782 | 782 |
| 783 content::RenderProcessHost* process = | 783 content::RenderProcessHost* process = |
| 784 content::RenderProcessHost::FromID(child_process_id); | 784 content::RenderProcessHost::FromID(child_process_id); |
| 785 if (process) { | 785 if (process) { |
| 786 Profile* profile = Profile::FromBrowserContext( | 786 Profile* profile = Profile::FromBrowserContext( |
| 787 process->GetBrowserContext()); | 787 process->GetBrowserContext()); |
| 788 extensions::ProcessMap* process_map = | 788 if (profile->GetExtensionService()) { |
| 789 profile->GetExtensionService()->process_map(); | 789 extensions::ProcessMap* process_map = |
| 790 if (process_map && process_map->Contains(process->GetID())) | 790 profile->GetExtensionService()->process_map(); |
| 791 command_line->AppendSwitch(switches::kExtensionProcess); | 791 if (process_map && process_map->Contains(process->GetID())) |
| 792 command_line->AppendSwitch(switches::kExtensionProcess); |
| 793 } |
| 792 | 794 |
| 793 PrefService* prefs = profile->GetPrefs(); | 795 PrefService* prefs = profile->GetPrefs(); |
| 794 // Currently this pref is only registered if applied via a policy. | 796 // Currently this pref is only registered if applied via a policy. |
| 795 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) && | 797 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) && |
| 796 prefs->GetBoolean(prefs::kDisable3DAPIs)) { | 798 prefs->GetBoolean(prefs::kDisable3DAPIs)) { |
| 797 // Turn this policy into a command line switch. | 799 // Turn this policy into a command line switch. |
| 798 command_line->AppendSwitch(switches::kDisable3DAPIs); | 800 command_line->AppendSwitch(switches::kDisable3DAPIs); |
| 799 } | 801 } |
| 800 | 802 |
| 801 // Disable client-side phishing detection in the renderer if it is | 803 // Disable client-side phishing detection in the renderer if it is |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1726 partition_id = extension->id(); | 1728 partition_id = extension->id(); |
| 1727 } | 1729 } |
| 1728 | 1730 |
| 1729 // Enforce that IsValidStoragePartitionId() implementation stays in sync. | 1731 // Enforce that IsValidStoragePartitionId() implementation stays in sync. |
| 1730 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); | 1732 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); |
| 1731 return partition_id; | 1733 return partition_id; |
| 1732 } | 1734 } |
| 1733 | 1735 |
| 1734 | 1736 |
| 1735 } // namespace chrome | 1737 } // namespace chrome |
| OLD | NEW |