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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 6995032: Fix a browser crash involving omnibox extension keywords. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: latest Created 9 years, 7 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/browser/ui/cocoa/tabs/tab_strip_controller.mm ('k') | chrome/browser/ui/gtk/gtk_util.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 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/mac/nsimage_cache.h" 9 #include "app/mac/nsimage_cache.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 763
764 // (URLDropTargetController protocol) 764 // (URLDropTargetController protocol)
765 - (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point { 765 - (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point {
766 // TODO(viettrungluu): This code is more or less copied from the code in 766 // TODO(viettrungluu): This code is more or less copied from the code in
767 // |TabStripController|. I'll refactor this soon to make it common and expand 767 // |TabStripController|. I'll refactor this soon to make it common and expand
768 // its capabilities (e.g., allow text DnD). 768 // its capabilities (e.g., allow text DnD).
769 769
770 // If the input is plain text, classify the input and make the URL. 770 // If the input is plain text, classify the input and make the URL.
771 AutocompleteMatch match; 771 AutocompleteMatch match;
772 browser_->profile()->GetAutocompleteClassifier()->Classify( 772 browser_->profile()->GetAutocompleteClassifier()->Classify(
773 base::SysNSStringToUTF16(text), string16(), false, &match, NULL); 773 base::SysNSStringToUTF16(text), string16(), false, false, &match, NULL);
774 GURL url(match.destination_url); 774 GURL url(match.destination_url);
775 775
776 browser_->GetSelectedTabContents()->OpenURL(url, GURL(), CURRENT_TAB, 776 browser_->GetSelectedTabContents()->OpenURL(url, GURL(), CURRENT_TAB,
777 PageTransition::TYPED); 777 PageTransition::TYPED);
778 } 778 }
779 779
780 // (URLDropTargetController protocol) 780 // (URLDropTargetController protocol)
781 - (void)indicateDropURLsInView:(NSView*)view at:(NSPoint)point { 781 - (void)indicateDropURLsInView:(NSView*)view at:(NSPoint)point {
782 // Do nothing. 782 // Do nothing.
783 } 783 }
784 784
785 // (URLDropTargetController protocol) 785 // (URLDropTargetController protocol)
786 - (void)hideDropURLsIndicatorInView:(NSView*)view { 786 - (void)hideDropURLsIndicatorInView:(NSView*)view {
787 // Do nothing. 787 // Do nothing.
788 } 788 }
789 789
790 @end 790 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm ('k') | chrome/browser/ui/gtk/gtk_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698