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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
936 #if defined(OS_ANDROID) | 936 #if defined(OS_ANDROID) |
937 host->AddFilter(new EncryptedMediaMessageFilterAndroid()); | 937 host->AddFilter(new EncryptedMediaMessageFilterAndroid()); |
938 #endif | 938 #endif |
939 | 939 |
940 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( | 940 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
941 profile->IsOffTheRecord())); | 941 profile->IsOffTheRecord())); |
942 | 942 |
943 SendExtensionWebRequestStatusToHost(host); | 943 SendExtensionWebRequestStatusToHost(host); |
944 | 944 |
945 RendererContentSettingRules rules; | 945 RendererContentSettingRules rules; |
946 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); | 946 if (host->IsGuest()) { |
947 GuestView::GetDefaultContentSettingRules(&rules, false /* incognito */); | |
jochen (gone - plz use gerrit)
2013/12/03 15:35:07
this should be just profile->IsOffTheRecord();
Fady Samuel
2013/12/03 15:56:26
Done.
| |
948 GuestView::GetDefaultContentSettingRules(&rules, true /* incognito */); | |
949 } else { | |
950 GetRendererContentSettingRules( | |
951 profile->GetHostContentSettingsMap(), &rules); | |
952 } | |
947 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); | 953 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
948 } | 954 } |
949 | 955 |
950 GURL ChromeContentBrowserClient::GetEffectiveURL( | 956 GURL ChromeContentBrowserClient::GetEffectiveURL( |
951 content::BrowserContext* browser_context, const GURL& url) { | 957 content::BrowserContext* browser_context, const GURL& url) { |
952 Profile* profile = Profile::FromBrowserContext(browser_context); | 958 Profile* profile = Profile::FromBrowserContext(browser_context); |
953 if (!profile) | 959 if (!profile) |
954 return url; | 960 return url; |
955 | 961 |
956 // If the input |url| should be assigned to the Instant renderer, make its | 962 // If the input |url| should be assigned to the Instant renderer, make its |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1269 } | 1275 } |
1270 #endif | 1276 #endif |
1271 | 1277 |
1272 ExtensionService* service = | 1278 ExtensionService* service = |
1273 extensions::ExtensionSystem::Get(profile)->extension_service(); | 1279 extensions::ExtensionSystem::Get(profile)->extension_service(); |
1274 if (!service) | 1280 if (!service) |
1275 return; | 1281 return; |
1276 | 1282 |
1277 const Extension* extension = service->extensions()->GetExtensionOrAppByURL( | 1283 const Extension* extension = service->extensions()->GetExtensionOrAppByURL( |
1278 site_instance->GetSiteURL()); | 1284 site_instance->GetSiteURL()); |
1285 | |
1279 if (!extension) | 1286 if (!extension) |
1280 return; | 1287 return; |
1281 | 1288 |
1282 service->process_map()->Insert(extension->id(), | 1289 service->process_map()->Insert(extension->id(), |
1283 site_instance->GetProcess()->GetID(), | 1290 site_instance->GetProcess()->GetID(), |
1284 site_instance->GetId()); | 1291 site_instance->GetId()); |
1285 BrowserThread::PostTask( | 1292 BrowserThread::PostTask( |
1286 BrowserThread::IO, | 1293 BrowserThread::IO, |
1287 FROM_HERE, | 1294 FROM_HERE, |
1288 base::Bind(&InfoMap::RegisterExtensionProcess, | 1295 base::Bind(&InfoMap::RegisterExtensionProcess, |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2639 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2646 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
2640 allowed_file_handle_origins_) || | 2647 allowed_file_handle_origins_) || |
2641 IsHostAllowedByCommandLine(url, extension_set, | 2648 IsHostAllowedByCommandLine(url, extension_set, |
2642 switches::kAllowNaClFileHandleAPI); | 2649 switches::kAllowNaClFileHandleAPI); |
2643 #else | 2650 #else |
2644 return false; | 2651 return false; |
2645 #endif | 2652 #endif |
2646 } | 2653 } |
2647 | 2654 |
2648 } // namespace chrome | 2655 } // namespace chrome |
OLD | NEW |