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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit.cc

Issue 6465020: Add metrics for omnibox Google searches that has no RLZ token for windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/autocomplete/autocomplete_edit.h" 5 #include "chrome/browser/autocomplete/autocomplete_edit.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // as aggressively later. 366 // as aggressively later.
367 match.transition = PageTransition::LINK; 367 match.transition = PageTransition::LINK;
368 } 368 }
369 369
370 if (match.type == AutocompleteMatch::SEARCH_WHAT_YOU_TYPED || 370 if (match.type == AutocompleteMatch::SEARCH_WHAT_YOU_TYPED ||
371 match.type == AutocompleteMatch::SEARCH_HISTORY || 371 match.type == AutocompleteMatch::SEARCH_HISTORY ||
372 match.type == AutocompleteMatch::SEARCH_SUGGEST) { 372 match.type == AutocompleteMatch::SEARCH_SUGGEST) {
373 const TemplateURL* default_provider = 373 const TemplateURL* default_provider =
374 profile_->GetTemplateURLModel()->GetDefaultSearchProvider(); 374 profile_->GetTemplateURLModel()->GetDefaultSearchProvider();
375 if (default_provider && default_provider->url() && 375 if (default_provider && default_provider->url() &&
376 default_provider->url()->HasGoogleBaseURLs()) 376 default_provider->url()->HasGoogleBaseURLs()) {
377 GoogleURLTracker::GoogleURLSearchCommitted(); 377 GoogleURLTracker::GoogleURLSearchCommitted();
378 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
379 // TODO(pastarmovj): Remove these metrics once we have proven that (close
380 // to) none searches that should have RLZ are sent out without one.
381 default_provider->url()->CollectRLZMetrics();
382 #endif
383 }
378 } 384 }
379 view_->OpenURL(match.destination_url, disposition, match.transition, 385 view_->OpenURL(match.destination_url, disposition, match.transition,
380 alternate_nav_url, AutocompletePopupModel::kNoMatch, 386 alternate_nav_url, AutocompletePopupModel::kNoMatch,
381 is_keyword_hint_ ? string16() : keyword_); 387 is_keyword_hint_ ? string16() : keyword_);
382 } 388 }
383 389
384 void AutocompleteEditModel::OpenURL(const GURL& url, 390 void AutocompleteEditModel::OpenURL(const GURL& url,
385 WindowOpenDisposition disposition, 391 WindowOpenDisposition disposition,
386 PageTransition::Type transition, 392 PageTransition::Type transition,
387 const GURL& alternate_nav_url, 393 const GURL& alternate_nav_url,
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 // static 822 // static
817 bool AutocompleteEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) { 823 bool AutocompleteEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) {
818 switch (c) { 824 switch (c) {
819 case 0x0020: // Space 825 case 0x0020: // Space
820 case 0x3000: // Ideographic Space 826 case 0x3000: // Ideographic Space
821 return true; 827 return true;
822 default: 828 default:
823 return false; 829 return false;
824 } 830 }
825 } 831 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698