| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 match.transition = content::PAGE_TRANSITION_RELOAD; | 488 match.transition = content::PAGE_TRANSITION_RELOAD; |
| 489 } else if (for_drop || ((paste_state_ != NONE) && | 489 } else if (for_drop || ((paste_state_ != NONE) && |
| 490 match.is_history_what_you_typed_match)) { | 490 match.is_history_what_you_typed_match)) { |
| 491 // When the user pasted in a URL and hit enter, score it like a link click | 491 // When the user pasted in a URL and hit enter, score it like a link click |
| 492 // rather than a normal typed URL, so it doesn't get inline autocompleted | 492 // rather than a normal typed URL, so it doesn't get inline autocompleted |
| 493 // as aggressively later. | 493 // as aggressively later. |
| 494 match.transition = content::PAGE_TRANSITION_LINK; | 494 match.transition = content::PAGE_TRANSITION_LINK; |
| 495 } | 495 } |
| 496 | 496 |
| 497 const TemplateURL* template_url = match.GetTemplateURL(); | 497 const TemplateURL* template_url = match.GetTemplateURL(); |
| 498 if (template_url && template_url->url() && | 498 if (template_url && template_url->url_ref().HasGoogleBaseURLs()) { |
| 499 template_url->url()->HasGoogleBaseURLs()) { | |
| 500 GoogleURLTracker::GoogleURLSearchCommitted(); | 499 GoogleURLTracker::GoogleURLSearchCommitted(); |
| 501 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) | 500 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) |
| 502 // TODO(pastarmovj): Remove these metrics once we have proven that (close | 501 // TODO(pastarmovj): Remove these metrics once we have proven that (close |
| 503 // to) none searches that should have RLZ are sent out without one. | 502 // to) none searches that should have RLZ are sent out without one. |
| 504 template_url->url()->CollectRLZMetrics(); | 503 template_url->url()->CollectRLZMetrics(); |
| 505 #endif | 504 #endif |
| 506 } | 505 } |
| 507 | 506 |
| 508 view_->OpenMatch(match, disposition, alternate_nav_url, | 507 view_->OpenMatch(match, disposition, alternate_nav_url, |
| 509 AutocompletePopupModel::kNoMatch); | 508 AutocompletePopupModel::kNoMatch); |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 // static | 1133 // static |
| 1135 bool AutocompleteEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) { | 1134 bool AutocompleteEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) { |
| 1136 switch (c) { | 1135 switch (c) { |
| 1137 case 0x0020: // Space | 1136 case 0x0020: // Space |
| 1138 case 0x3000: // Ideographic Space | 1137 case 0x3000: // Ideographic Space |
| 1139 return true; | 1138 return true; |
| 1140 default: | 1139 default: |
| 1141 return false; | 1140 return false; |
| 1142 } | 1141 } |
| 1143 } | 1142 } |
| OLD | NEW |