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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_interstitial.cc

Issue 2841833002: Renamed LoadCommittedDetails.is_in_page to is_same_document. (Closed)
Patch Set: I said "once and for all" Created 3 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user/supervised_user_interstitial.h" 5 #include "chrome/browser/supervised_user/supervised_user_interstitial.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // request without showing the interstitial. 150 // request without showing the interstitial.
151 DispatchContinueRequest(true); 151 DispatchContinueRequest(true);
152 return false; 152 return false;
153 } 153 }
154 154
155 InfoBarService* service = InfoBarService::FromWebContents(web_contents_); 155 InfoBarService* service = InfoBarService::FromWebContents(web_contents_);
156 if (service) { 156 if (service) {
157 // Remove all the infobars which are attached to |web_contents_| and for 157 // Remove all the infobars which are attached to |web_contents_| and for
158 // which ShouldExpire() returns true. 158 // which ShouldExpire() returns true.
159 content::LoadCommittedDetails details; 159 content::LoadCommittedDetails details;
160 // |details.is_in_page| is default false, and |details.is_main_frame| is 160 // |details.is_same_page| is default false, and |details.is_main_frame| is
161 // default true. This results in is_navigation_to_different_page() returning 161 // default true. This results in is_navigation_to_different_page() returning
162 // true. 162 // true.
163 DCHECK(details.is_navigation_to_different_page()); 163 DCHECK(details.is_navigation_to_different_page());
164 const content::NavigationController& controller = 164 const content::NavigationController& controller =
165 web_contents_->GetController(); 165 web_contents_->GetController();
166 details.entry = controller.GetActiveEntry(); 166 details.entry = controller.GetActiveEntry();
167 if (controller.GetLastCommittedEntry()) { 167 if (controller.GetLastCommittedEntry()) {
168 details.previous_entry_index = controller.GetLastCommittedEntryIndex(); 168 details.previous_entry_index = controller.GetLastCommittedEntryIndex();
169 details.previous_url = controller.GetLastCommittedEntry()->GetURL(); 169 details.previous_url = controller.GetLastCommittedEntry()->GetURL();
170 } 170 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 SupervisedUserServiceFactory::GetForProfile(profile_); 347 SupervisedUserServiceFactory::GetForProfile(profile_);
348 supervised_user_service->RemoveObserver(this); 348 supervised_user_service->RemoveObserver(this);
349 349
350 if (!callback_.is_null()) 350 if (!callback_.is_null())
351 callback_.Run(continue_request); 351 callback_.Run(continue_request);
352 352
353 // After this, the WebContents may be destroyed. Make sure we don't try to use 353 // After this, the WebContents may be destroyed. Make sure we don't try to use
354 // it again. 354 // it again.
355 web_contents_ = nullptr; 355 web_contents_ = nullptr;
356 } 356 }
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/media_file_system_registry.cc ('k') | chrome/browser/ui/chrome_bubble_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698