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

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

Issue 8298005: Fixes bug in instant where we would end up incorrectly using the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweak Created 9 years, 2 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/automation/testing_automation_provider.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 (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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 1012
1013 TabContentsWrapper* tab = controller_->GetTabContentsWrapper(); 1013 TabContentsWrapper* tab = controller_->GetTabContentsWrapper();
1014 1014
1015 if (!tab) 1015 if (!tab)
1016 return false; 1016 return false;
1017 1017
1018 if (user_input_in_progress() && popup_->IsOpen()) { 1018 if (user_input_in_progress() && popup_->IsOpen()) {
1019 return instant->Update(tab, match, view_->GetText(), UseVerbatimInstant(), 1019 return instant->Update(tab, match, view_->GetText(), UseVerbatimInstant(),
1020 suggested_text); 1020 suggested_text);
1021 } else { 1021 } else {
1022 instant->DestroyPreviewContentsAndLeaveActive(); 1022 instant->Hide();
1023 return false; 1023 return false;
1024 } 1024 }
1025 } 1025 }
1026 1026
1027 void AutocompleteEditModel::DoPrerender(const AutocompleteMatch& match) { 1027 void AutocompleteEditModel::DoPrerender(const AutocompleteMatch& match) {
1028 // Do not prerender if the destination URL is the same as the current URL. 1028 // Do not prerender if the destination URL is the same as the current URL.
1029 if (match.destination_url == PermanentURL()) 1029 if (match.destination_url == PermanentURL())
1030 return; 1030 return;
1031 if (user_input_in_progress() && popup_->IsOpen()) { 1031 if (user_input_in_progress() && popup_->IsOpen()) {
1032 TabContentsWrapper* tab = controller_->GetTabContentsWrapper(); 1032 TabContentsWrapper* tab = controller_->GetTabContentsWrapper();
(...skipping 23 matching lines...) Expand all
1056 // static 1056 // static
1057 bool AutocompleteEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) { 1057 bool AutocompleteEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) {
1058 switch (c) { 1058 switch (c) {
1059 case 0x0020: // Space 1059 case 0x0020: // Space
1060 case 0x3000: // Ideographic Space 1060 case 0x3000: // Ideographic Space
1061 return true; 1061 return true;
1062 default: 1062 default:
1063 return false; 1063 return false;
1064 } 1064 }
1065 } 1065 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698