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

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 2524053002: Don't update TabSpecificContentSettings on same-page navigation (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | 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/content_settings/tab_specific_content_settings.h" 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ContentBlocked, 793 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ContentBlocked,
794 OnContentBlockedWithDetail) 794 OnContentBlockedWithDetail)
795 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidUseKeygen, OnDidUseKeygen) 795 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidUseKeygen, OnDidUseKeygen)
796 IPC_MESSAGE_UNHANDLED(handled = false) 796 IPC_MESSAGE_UNHANDLED(handled = false)
797 IPC_END_MESSAGE_MAP() 797 IPC_END_MESSAGE_MAP()
798 return handled; 798 return handled;
799 } 799 }
800 800
801 void TabSpecificContentSettings::DidStartNavigation( 801 void TabSpecificContentSettings::DidStartNavigation(
802 content::NavigationHandle* navigation_handle) { 802 content::NavigationHandle* navigation_handle) {
803 if (!navigation_handle->IsInMainFrame()) 803 if (!navigation_handle->IsInMainFrame() || navigation_handle->IsSamePage())
804 return; 804 return;
805 805
806 const content::NavigationController& controller = 806 const content::NavigationController& controller =
807 web_contents()->GetController(); 807 web_contents()->GetController();
808 content::NavigationEntry* last_committed_entry = 808 content::NavigationEntry* last_committed_entry =
809 controller.GetLastCommittedEntry(); 809 controller.GetLastCommittedEntry();
810 if (last_committed_entry) 810 if (last_committed_entry)
811 previous_url_ = last_committed_entry->GetURL(); 811 previous_url_ = last_committed_entry->GetURL();
812 812
813 // If we're displaying a network error page do not reset the content 813 // If we're displaying a network error page do not reset the content
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 static_cast<MicrophoneCameraStateFlags>( 910 static_cast<MicrophoneCameraStateFlags>(
911 TabSpecificContentSettings::MICROPHONE_ACCESSED | 911 TabSpecificContentSettings::MICROPHONE_ACCESSED |
912 TabSpecificContentSettings::MICROPHONE_BLOCKED | 912 TabSpecificContentSettings::MICROPHONE_BLOCKED |
913 TabSpecificContentSettings::CAMERA_ACCESSED | 913 TabSpecificContentSettings::CAMERA_ACCESSED |
914 TabSpecificContentSettings::CAMERA_BLOCKED); 914 TabSpecificContentSettings::CAMERA_BLOCKED);
915 OnMediaStreamPermissionSet( 915 OnMediaStreamPermissionSet(
916 web_contents()->GetLastCommittedURL(), 916 web_contents()->GetLastCommittedURL(),
917 media_blocked, 917 media_blocked,
918 std::string(), std::string(), std::string(), std::string()); 918 std::string(), std::string(), std::string(), std::string());
919 } 919 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698