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

Side by Side Diff: chrome/browser/data_use_measurement/chrome_data_use_ascriber_service.cc

Issue 2716493004: Renamed NavigationHandle::IsSamePage to NavigationHandle::IsSameDocument (Closed)
Patch Set: Rebased Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/data_use_measurement/chrome_data_use_ascriber_service.h " 5 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber_service.h "
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber.h" 10 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 if (!navigation_handle->IsInMainFrame()) 147 if (!navigation_handle->IsInMainFrame())
148 return; 148 return;
149 149
150 if (!ascriber_) 150 if (!ascriber_)
151 return; 151 return;
152 152
153 content::WebContents* web_contents = navigation_handle->GetWebContents(); 153 content::WebContents* web_contents = navigation_handle->GetWebContents();
154 content::BrowserThread::PostTask( 154 content::BrowserThread::PostTask(
155 content::BrowserThread::IO, FROM_HERE, 155 content::BrowserThread::IO, FROM_HERE,
156 base::Bind( 156 base::Bind(&ChromeDataUseAscriber::ReadyToCommitMainFrameNavigation,
157 &ChromeDataUseAscriber::ReadyToCommitMainFrameNavigation, 157 base::Unretained(ascriber_), navigation_handle->GetURL(),
158 base::Unretained(ascriber_), navigation_handle->GetURL(), 158 navigation_handle->GetGlobalRequestID(),
159 navigation_handle->GetGlobalRequestID(), 159 web_contents->GetRenderProcessHost()->GetID(),
160 web_contents->GetRenderProcessHost()->GetID(), 160 web_contents->GetMainFrame()->GetRoutingID(),
161 web_contents->GetMainFrame()->GetRoutingID(), 161 !navigation_handle->HasCommitted() ||
162 !navigation_handle->HasCommitted() || navigation_handle->IsSamePage(), 162 navigation_handle->IsSameDocument(),
163 navigation_handle)); 163 navigation_handle));
164 } 164 }
165 165
166 void ChromeDataUseAscriberService::SetDataUseAscriber( 166 void ChromeDataUseAscriberService::SetDataUseAscriber(
167 ChromeDataUseAscriber* ascriber) { 167 ChromeDataUseAscriber* ascriber) {
168 DCHECK(!is_initialized_); 168 DCHECK(!is_initialized_);
169 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 169 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
170 170
171 ascriber_ = ascriber; 171 ascriber_ = ascriber;
172 is_initialized_ = true; 172 is_initialized_ = true;
173 173
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 content::BrowserThread::PostTask( 213 content::BrowserThread::PostTask(
214 content::BrowserThread::IO, FROM_HERE, 214 content::BrowserThread::IO, FROM_HERE,
215 base::Bind(&ChromeDataUseAscriber::RenderFrameHostChanged, 215 base::Bind(&ChromeDataUseAscriber::RenderFrameHostChanged,
216 base::Unretained(ascriber_), old_host->GetProcess()->GetID(), 216 base::Unretained(ascriber_), old_host->GetProcess()->GetID(),
217 old_host->GetRoutingID(), new_host->GetProcess()->GetID(), 217 old_host->GetRoutingID(), new_host->GetProcess()->GetID(),
218 new_host->GetRoutingID())); 218 new_host->GetRoutingID()));
219 } 219 }
220 } 220 }
221 221
222 } // namespace data_use_measurement 222 } // namespace data_use_measurement
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings.cc ('k') | chrome/browser/engagement/site_engagement_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698