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

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

Issue 18430004: Sets correct ActivityLog enabled status to the first renderer process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ChromeOS fix Created 7 years, 4 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 | « no previous file | chrome/browser/extensions/activity_log/activity_log.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 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 // safe to continue. 783 // safe to continue.
784 CHECK(can_be_default || !partition_domain->empty()); 784 CHECK(can_be_default || !partition_domain->empty());
785 } 785 }
786 786
787 content::WebContentsViewDelegate* 787 content::WebContentsViewDelegate*
788 ChromeContentBrowserClient::GetWebContentsViewDelegate( 788 ChromeContentBrowserClient::GetWebContentsViewDelegate(
789 content::WebContents* web_contents) { 789 content::WebContents* web_contents) {
790 return chrome::CreateWebContentsViewDelegate(web_contents); 790 return chrome::CreateWebContentsViewDelegate(web_contents);
791 } 791 }
792 792
793 // Check if the extension activity log is enabled for the profile.
794 static bool IsExtensionActivityLogEnabledForProfile(Profile* profile) {
795 // crbug.com/247908 - This should be IsLogEnabled except for an issue
796 // in chrome_frame_net_tests
797 return extensions::ActivityLog::IsLogEnabledOnAnyProfile();
798 }
799
800 void ChromeContentBrowserClient::GuestWebContentsCreated( 793 void ChromeContentBrowserClient::GuestWebContentsCreated(
801 WebContents* guest_web_contents, 794 WebContents* guest_web_contents,
802 WebContents* opener_web_contents, 795 WebContents* opener_web_contents,
803 content::BrowserPluginGuestDelegate** guest_delegate, 796 content::BrowserPluginGuestDelegate** guest_delegate,
804 scoped_ptr<base::DictionaryValue> extra_params) { 797 scoped_ptr<base::DictionaryValue> extra_params) {
805 if (opener_web_contents) { 798 if (opener_web_contents) {
806 GuestView* guest = GuestView::FromWebContents(opener_web_contents); 799 GuestView* guest = GuestView::FromWebContents(opener_web_contents);
807 if (!guest) { 800 if (!guest) {
808 NOTREACHED(); 801 NOTREACHED();
809 return; 802 return;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 host->GetChannel()->AddFilter(new NaClHostMessageFilter( 905 host->GetChannel()->AddFilter(new NaClHostMessageFilter(
913 id, profile->IsOffTheRecord(), 906 id, profile->IsOffTheRecord(),
914 profile->GetPath(), extension_info_map, 907 profile->GetPath(), extension_info_map,
915 context)); 908 context));
916 #endif 909 #endif
917 910
918 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( 911 host->Send(new ChromeViewMsg_SetIsIncognitoProcess(
919 profile->IsOffTheRecord())); 912 profile->IsOffTheRecord()));
920 913
921 host->Send(new ChromeViewMsg_SetExtensionActivityLogEnabled( 914 host->Send(new ChromeViewMsg_SetExtensionActivityLogEnabled(
922 IsExtensionActivityLogEnabledForProfile(profile))); 915 extensions::ActivityLog::GetInstance(profile)->IsLogEnabled()));
923 916
924 SendExtensionWebRequestStatusToHost(host); 917 SendExtensionWebRequestStatusToHost(host);
925 918
926 RendererContentSettingRules rules; 919 RendererContentSettingRules rules;
927 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); 920 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules);
928 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); 921 host->Send(new ChromeViewMsg_SetContentSettingRules(rules));
929 } 922 }
930 923
931 GURL ChromeContentBrowserClient::GetEffectiveURL( 924 GURL ChromeContentBrowserClient::GetEffectiveURL(
932 content::BrowserContext* browser_context, const GURL& url) { 925 content::BrowserContext* browser_context, const GURL& url) {
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
2552 #if defined(USE_NSS) 2545 #if defined(USE_NSS)
2553 crypto::CryptoModuleBlockingPasswordDelegate* 2546 crypto::CryptoModuleBlockingPasswordDelegate*
2554 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 2547 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
2555 const GURL& url) { 2548 const GURL& url) {
2556 return chrome::NewCryptoModuleBlockingDialogDelegate( 2549 return chrome::NewCryptoModuleBlockingDialogDelegate(
2557 chrome::kCryptoModulePasswordKeygen, url.host()); 2550 chrome::kCryptoModulePasswordKeygen, url.host());
2558 } 2551 }
2559 #endif 2552 #endif
2560 2553
2561 } // namespace chrome 2554 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/activity_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698