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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 49283004: Add UMA stats for tracking bookmark depth (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky Created 7 years, 1 month 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
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/browser/ui/omnibox/omnibox_edit_model.h" 5 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 controller_->OnAutocompleteAccept( 785 controller_->OnAutocompleteAccept(
786 destination_url, disposition, 786 destination_url, disposition,
787 content::PageTransitionFromInt( 787 content::PageTransitionFromInt(
788 match.transition | content::PAGE_TRANSITION_FROM_ADDRESS_BAR)); 788 match.transition | content::PAGE_TRANSITION_FROM_ADDRESS_BAR));
789 if (observer->load_state() != OmniboxNavigationObserver::LOAD_NOT_SEEN) 789 if (observer->load_state() != OmniboxNavigationObserver::LOAD_NOT_SEEN)
790 ignore_result(observer.release()); // The observer will delete itself. 790 ignore_result(observer.release()); // The observer will delete itself.
791 } 791 }
792 } 792 }
793 793
794 if (match.starred) 794 if (match.starred)
795 RecordBookmarkLaunch(BOOKMARK_LAUNCH_LOCATION_OMNIBOX); 795 RecordBookmarkLaunch(NULL, BOOKMARK_LAUNCH_LOCATION_OMNIBOX);
796 } 796 }
797 797
798 bool OmniboxEditModel::AcceptKeyword(EnteredKeywordModeMethod entered_method) { 798 bool OmniboxEditModel::AcceptKeyword(EnteredKeywordModeMethod entered_method) {
799 DCHECK(is_keyword_hint_ && !keyword_.empty()); 799 DCHECK(is_keyword_hint_ && !keyword_.empty());
800 800
801 autocomplete_controller()->Stop(false); 801 autocomplete_controller()->Stop(false);
802 is_keyword_hint_ = false; 802 is_keyword_hint_ = false;
803 803
804 if (popup_model()->IsOpen()) 804 if (popup_model()->IsOpen())
805 popup_model()->SetSelectedLineState(OmniboxPopupModel::KEYWORD); 805 popup_model()->SetSelectedLineState(OmniboxPopupModel::KEYWORD);
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 instant->OmniboxFocusChanged(state, reason, NULL); 1383 instant->OmniboxFocusChanged(state, reason, NULL);
1384 1384
1385 // Update state and notify view if the omnibox has focus and the caret 1385 // Update state and notify view if the omnibox has focus and the caret
1386 // visibility changed. 1386 // visibility changed.
1387 const bool was_caret_visible = is_caret_visible(); 1387 const bool was_caret_visible = is_caret_visible();
1388 focus_state_ = state; 1388 focus_state_ = state;
1389 if (focus_state_ != OMNIBOX_FOCUS_NONE && 1389 if (focus_state_ != OMNIBOX_FOCUS_NONE &&
1390 is_caret_visible() != was_caret_visible) 1390 is_caret_visible() != was_caret_visible)
1391 view_->ApplyCaretVisibility(); 1391 view_->ApplyCaretVisibility();
1392 } 1392 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/bookmarks/bookmark_sub_menu_model_gtk.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698