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

Side by Side Diff: chrome/browser/precache/precache_util.cc

Issue 2269833002: Refactor the DataUseMeasurement class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More mechanical changes Created 4 years, 3 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/precache/precache_util.h" 5 #include "chrome/browser/precache/precache_util.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/precache/precache_manager_factory.h" 9 #include "chrome/browser/precache/precache_manager_factory.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // Record precache metrics when a fetch is completed successfully, if 63 // Record precache metrics when a fetch is completed successfully, if
64 // precaching is allowed. 64 // precaching is allowed.
65 content::BrowserThread::PostTask( 65 content::BrowserThread::PostTask(
66 content::BrowserThread::UI, FROM_HERE, 66 content::BrowserThread::UI, FROM_HERE,
67 base::Bind( 67 base::Bind(
68 &UpdatePrecacheMetricsAndStateOnUIThread, request->url(), 68 &UpdatePrecacheMetricsAndStateOnUIThread, request->url(),
69 GURL(request->referrer()), latency, base::Time::Now(), 69 GURL(request->referrer()), latency, base::Time::Now(),
70 request->response_info(), received_content_length, 70 request->response_info(), received_content_length,
71 data_use_measurement::DataUseMeasurement::IsUserInitiatedRequest( 71 data_use_measurement::DataUseMeasurement::IsUserInitiatedRequest(
72 request), 72 *request),
73 profile_id)); 73 profile_id));
74 } 74 }
75 75
76 } // namespace precache 76 } // namespace precache
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | components/data_use_measurement/content/data_use_measurement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698