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

Side by Side Diff: components/ntp_snippets/remote/remote_suggestions_provider_impl.cc

Issue 2685523002: [Remote suggestions] Measure separate data use for JSONs and thumbnails (Closed)
Patch Set: Comments #1 Created 3 years, 10 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
« no previous file with comments | « components/ntp_snippets/remote/json_request.cc ('k') | tools/metrics/histograms/histograms.xml » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/ntp_snippets/remote/remote_suggestions_provider_impl.h" 5 #include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 : image_fetcher_(std::move(image_fetcher)), 166 : image_fetcher_(std::move(image_fetcher)),
167 image_decoder_(std::move(image_decoder)), 167 image_decoder_(std::move(image_decoder)),
168 database_(database), 168 database_(database),
169 thumbnail_requests_throttler_( 169 thumbnail_requests_throttler_(
170 pref_service, 170 pref_service,
171 RequestThrottler::RequestType::CONTENT_SUGGESTION_THUMBNAIL) { 171 RequestThrottler::RequestType::CONTENT_SUGGESTION_THUMBNAIL) {
172 // |image_fetcher_| can be null in tests. 172 // |image_fetcher_| can be null in tests.
173 if (image_fetcher_) { 173 if (image_fetcher_) {
174 image_fetcher_->SetImageFetcherDelegate(this); 174 image_fetcher_->SetImageFetcherDelegate(this);
175 image_fetcher_->SetDataUseServiceName( 175 image_fetcher_->SetDataUseServiceName(
176 data_use_measurement::DataUseUserData::NTP_SNIPPETS); 176 data_use_measurement::DataUseUserData::NTP_SNIPPETS_THUMBNAILS);
177 } 177 }
178 } 178 }
179 179
180 CachedImageFetcher::~CachedImageFetcher() {} 180 CachedImageFetcher::~CachedImageFetcher() {}
181 181
182 void CachedImageFetcher::FetchSuggestionImage( 182 void CachedImageFetcher::FetchSuggestionImage(
183 const ContentSuggestion::ID& suggestion_id, 183 const ContentSuggestion::ID& suggestion_id,
184 const GURL& url, 184 const GURL& url,
185 const ImageFetchedCallback& callback) { 185 const ImageFetchedCallback& callback) {
186 database_->LoadImage( 186 database_->LoadImage(
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 RemoteSuggestionsProviderImpl::CategoryContent::CategoryContent( 1270 RemoteSuggestionsProviderImpl::CategoryContent::CategoryContent(
1271 CategoryContent&&) = default; 1271 CategoryContent&&) = default;
1272 1272
1273 RemoteSuggestionsProviderImpl::CategoryContent::~CategoryContent() = default; 1273 RemoteSuggestionsProviderImpl::CategoryContent::~CategoryContent() = default;
1274 1274
1275 RemoteSuggestionsProviderImpl::CategoryContent& 1275 RemoteSuggestionsProviderImpl::CategoryContent&
1276 RemoteSuggestionsProviderImpl::CategoryContent::operator=(CategoryContent&&) = 1276 RemoteSuggestionsProviderImpl::CategoryContent::operator=(CategoryContent&&) =
1277 default; 1277 default;
1278 1278
1279 } // namespace ntp_snippets 1279 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « components/ntp_snippets/remote/json_request.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698