| 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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 browser_command_line.GetSwitchValueASCII(switches::kLoginProfile); | 844 browser_command_line.GetSwitchValueASCII(switches::kLoginProfile); |
| 845 if (!login_profile.empty()) | 845 if (!login_profile.empty()) |
| 846 command_line->AppendSwitchASCII(switches::kLoginProfile, login_profile); | 846 command_line->AppendSwitchASCII(switches::kLoginProfile, login_profile); |
| 847 #endif | 847 #endif |
| 848 | 848 |
| 849 content::RenderProcessHost* process = | 849 content::RenderProcessHost* process = |
| 850 content::RenderProcessHost::FromID(child_process_id); | 850 content::RenderProcessHost::FromID(child_process_id); |
| 851 if (process) { | 851 if (process) { |
| 852 Profile* profile = Profile::FromBrowserContext( | 852 Profile* profile = Profile::FromBrowserContext( |
| 853 process->GetBrowserContext()); | 853 process->GetBrowserContext()); |
| 854 extensions::ProcessMap* process_map = | 854 if (profile->GetExtensionService()) { |
| 855 profile->GetExtensionService()->process_map(); | 855 extensions::ProcessMap* process_map = |
| 856 if (process_map && process_map->Contains(process->GetID())) | 856 profile->GetExtensionService()->process_map(); |
| 857 command_line->AppendSwitch(switches::kExtensionProcess); | 857 if (process_map && process_map->Contains(process->GetID())) |
| 858 command_line->AppendSwitch(switches::kExtensionProcess); |
| 859 } |
| 858 | 860 |
| 859 PrefService* prefs = profile->GetPrefs(); | 861 PrefService* prefs = profile->GetPrefs(); |
| 860 // Currently this pref is only registered if applied via a policy. | 862 // Currently this pref is only registered if applied via a policy. |
| 861 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) && | 863 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) && |
| 862 prefs->GetBoolean(prefs::kDisable3DAPIs)) { | 864 prefs->GetBoolean(prefs::kDisable3DAPIs)) { |
| 863 // Turn this policy into a command line switch. | 865 // Turn this policy into a command line switch. |
| 864 command_line->AppendSwitch(switches::kDisable3DAPIs); | 866 command_line->AppendSwitch(switches::kDisable3DAPIs); |
| 865 } | 867 } |
| 866 | 868 |
| 867 // Disable client-side phishing detection in the renderer if it is | 869 // Disable client-side phishing detection in the renderer if it is |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 partition_id = extension->id(); | 1794 partition_id = extension->id(); |
| 1793 } | 1795 } |
| 1794 | 1796 |
| 1795 // Enforce that IsValidStoragePartitionId() implementation stays in sync. | 1797 // Enforce that IsValidStoragePartitionId() implementation stays in sync. |
| 1796 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); | 1798 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); |
| 1797 return partition_id; | 1799 return partition_id; |
| 1798 } | 1800 } |
| 1799 | 1801 |
| 1800 | 1802 |
| 1801 } // namespace chrome | 1803 } // namespace chrome |
| OLD | NEW |