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

Side by Side Diff: chrome/browser/ui/search/search_ipc_router.cc

Issue 2790463003: ntp_tiles: Cleanup enum names (Closed)
Patch Set: add back histogram enums 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/search/search_ipc_router.h" 5 #include "chrome/browser/ui/search/search_ipc_router.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/search/instant_service.h" 10 #include "chrome/browser/search/instant_service.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 delegate_->OnInstantSupportDetermined(true); 244 delegate_->OnInstantSupportDetermined(true);
245 if (!policy_->ShouldProcessLogEvent()) 245 if (!policy_->ShouldProcessLogEvent())
246 return; 246 return;
247 247
248 delegate_->OnLogEvent(event, time); 248 delegate_->OnLogEvent(event, time);
249 } 249 }
250 250
251 void SearchIPCRouter::LogMostVisitedImpression( 251 void SearchIPCRouter::LogMostVisitedImpression(
252 int page_seq_no, 252 int page_seq_no,
253 int position, 253 int position,
254 ntp_tiles::NTPTileSource tile_source) { 254 ntp_tiles::TileSource tile_source) {
255 if (page_seq_no != commit_counter_) 255 if (page_seq_no != commit_counter_)
256 return; 256 return;
257 257
258 delegate_->OnInstantSupportDetermined(true); 258 delegate_->OnInstantSupportDetermined(true);
259 // Logging impressions is controlled by the same policy as logging events. 259 // Logging impressions is controlled by the same policy as logging events.
260 if (!policy_->ShouldProcessLogEvent()) 260 if (!policy_->ShouldProcessLogEvent())
261 return; 261 return;
262 262
263 delegate_->OnLogMostVisitedImpression(position, tile_source); 263 delegate_->OnLogMostVisitedImpression(position, tile_source);
264 } 264 }
265 265
266 void SearchIPCRouter::LogMostVisitedNavigation( 266 void SearchIPCRouter::LogMostVisitedNavigation(
267 int page_seq_no, 267 int page_seq_no,
268 int position, 268 int position,
269 ntp_tiles::NTPTileSource tile_source) { 269 ntp_tiles::TileSource tile_source) {
270 if (page_seq_no != commit_counter_) 270 if (page_seq_no != commit_counter_)
271 return; 271 return;
272 272
273 delegate_->OnInstantSupportDetermined(true); 273 delegate_->OnInstantSupportDetermined(true);
274 // Logging navigations is controlled by the same policy as logging events. 274 // Logging navigations is controlled by the same policy as logging events.
275 if (!policy_->ShouldProcessLogEvent()) 275 if (!policy_->ShouldProcessLogEvent())
276 return; 276 return;
277 277
278 delegate_->OnLogMostVisitedNavigation(position, tile_source); 278 delegate_->OnLogMostVisitedNavigation(position, tile_source);
279 } 279 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) { 316 void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) {
317 DCHECK(delegate); 317 DCHECK(delegate);
318 delegate_ = delegate; 318 delegate_ = delegate;
319 } 319 }
320 320
321 void SearchIPCRouter::set_policy_for_testing(std::unique_ptr<Policy> policy) { 321 void SearchIPCRouter::set_policy_for_testing(std::unique_ptr<Policy> policy) {
322 DCHECK(policy); 322 DCHECK(policy);
323 policy_ = std::move(policy); 323 policy_ = std::move(policy);
324 } 324 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_ipc_router.h ('k') | chrome/browser/ui/search/search_ipc_router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698