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

Side by Side Diff: chrome/renderer/searchbox/searchbox.cc

Issue 178253008: Redoing Issue 36073011: Allowing file:/// in Instant Extended's Most Visited links. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fixes; more symmetry to logImpression() and logNavigation(). Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/searchbox/searchbox.h ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/renderer/searchbox/searchbox.h" 5 #include "chrome/renderer/searchbox/searchbox.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 render_view()->Send(new ChromeViewHostMsg_LogEvent( 160 render_view()->Send(new ChromeViewHostMsg_LogEvent(
161 render_view()->GetRoutingID(), render_view()->GetPageId(), event)); 161 render_view()->GetRoutingID(), render_view()->GetPageId(), event));
162 } 162 }
163 163
164 void SearchBox::LogImpression(int position, const base::string16& provider) { 164 void SearchBox::LogImpression(int position, const base::string16& provider) {
165 render_view()->Send(new ChromeViewHostMsg_LogImpression( 165 render_view()->Send(new ChromeViewHostMsg_LogImpression(
166 render_view()->GetRoutingID(), render_view()->GetPageId(), position, 166 render_view()->GetRoutingID(), render_view()->GetPageId(), position,
167 provider)); 167 provider));
168 } 168 }
169 169
170 void SearchBox::LogNavigation(int position, const base::string16& provider) {
samarth 2014/03/06 21:01:22 I think LogMostVisitedClick is clearer here (and i
huangs 2014/03/07 00:33:41 Done, but using LogMostVisitedNavigation() (will c
171 render_view()->Send(new ChromeViewHostMsg_LogNavigation(
172 render_view()->GetRoutingID(), render_view()->GetPageId(), position,
173 provider));
174 }
175
170 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) { 176 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) {
171 render_view()->Send(new ChromeViewHostMsg_ChromeIdentityCheck( 177 render_view()->Send(new ChromeViewHostMsg_ChromeIdentityCheck(
172 render_view()->GetRoutingID(), render_view()->GetPageId(), identity)); 178 render_view()->GetRoutingID(), render_view()->GetPageId(), identity));
173 } 179 }
174 180
175 void SearchBox::DeleteMostVisitedItem( 181 void SearchBox::DeleteMostVisitedItem(
176 InstantRestrictedID most_visited_item_id) { 182 InstantRestrictedID most_visited_item_id) {
177 render_view()->Send(new ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem( 183 render_view()->Send(new ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem(
178 render_view()->GetRoutingID(), render_view()->GetPageId(), 184 render_view()->GetRoutingID(), render_view()->GetPageId(),
179 GetURLForMostVisitedItem(most_visited_item_id))); 185 GetURLForMostVisitedItem(most_visited_item_id)));
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 459 }
454 460
455 void SearchBox::Reset() { 461 void SearchBox::Reset() {
456 query_.clear(); 462 query_.clear();
457 suggestion_ = InstantSuggestion(); 463 suggestion_ = InstantSuggestion();
458 start_margin_ = 0; 464 start_margin_ = 0;
459 is_focused_ = false; 465 is_focused_ = false;
460 is_key_capture_enabled_ = false; 466 is_key_capture_enabled_ = false;
461 theme_info_ = ThemeBackgroundInfo(); 467 theme_info_ = ThemeBackgroundInfo();
462 } 468 }
OLDNEW
« no previous file with comments | « chrome/renderer/searchbox/searchbox.h ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698