| 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( | 713 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
| 714 profile->IsOffTheRecord())); | 714 profile->IsOffTheRecord())); |
| 715 | 715 |
| 716 SendExtensionWebRequestStatusToHost(host); | 716 SendExtensionWebRequestStatusToHost(host); |
| 717 | 717 |
| 718 RendererContentSettingRules rules; | 718 RendererContentSettingRules rules; |
| 719 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); | 719 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); |
| 720 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); | 720 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
| 721 } | 721 } |
| 722 | 722 |
| 723 void ChromeContentBrowserClient::RenderProcessHostDeleted( | |
| 724 content::RenderProcessHost* host) { | |
| 725 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); | |
| 726 if (!profile) | |
| 727 return; | |
| 728 | |
| 729 InstantService* instant_service = | |
| 730 InstantServiceFactory::GetForProfile(profile); | |
| 731 if (instant_service) | |
| 732 instant_service->RemoveInstantProcess(host->GetID()); | |
| 733 } | |
| 734 | |
| 735 GURL ChromeContentBrowserClient::GetEffectiveURL( | 723 GURL ChromeContentBrowserClient::GetEffectiveURL( |
| 736 content::BrowserContext* browser_context, const GURL& url) { | 724 content::BrowserContext* browser_context, const GURL& url) { |
| 737 Profile* profile = Profile::FromBrowserContext(browser_context); | 725 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 738 if (!profile) | 726 if (!profile) |
| 739 return url; | 727 return url; |
| 740 | 728 |
| 741 // If the input |url| is an Instant url, make its effective url distinct from | 729 // If the input |url| is an Instant url, make its effective url distinct from |
| 742 // other urls on the search provider's domain. | 730 // other urls on the search provider's domain. |
| 743 if (IsInstantURL(url, profile)) | 731 if (IsInstantURL(url, profile)) |
| 744 return GetEffectiveInstantURL(url, profile); | 732 return GetEffectiveInstantURL(url, profile); |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2052 io_thread_application_locale_ = locale; | 2040 io_thread_application_locale_ = locale; |
| 2053 } | 2041 } |
| 2054 | 2042 |
| 2055 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 2043 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
| 2056 const std::string& locale) { | 2044 const std::string& locale) { |
| 2057 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 2045 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 2058 io_thread_application_locale_ = locale; | 2046 io_thread_application_locale_ = locale; |
| 2059 } | 2047 } |
| 2060 | 2048 |
| 2061 } // namespace chrome | 2049 } // namespace chrome |
| OLD | NEW |