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

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

Issue 314113009: Omnibox Metrics: Make |completed_length| field sane (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/omnibox/omnibox_log.h ('k') | components/metrics/proto/omnibox_event.proto » ('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 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 OmniboxLog log( 744 OmniboxLog log(
745 input_text, 745 input_text,
746 just_deleted_text_, 746 just_deleted_text_,
747 input_.type(), 747 input_.type(),
748 popup_model()->IsOpen(), 748 popup_model()->IsOpen(),
749 (!popup_model()->IsOpen() || !pasted_text.empty()) ? 0 : index, 749 (!popup_model()->IsOpen() || !pasted_text.empty()) ? 0 : index,
750 !pasted_text.empty(), 750 !pasted_text.empty(),
751 -1, // don't yet know tab ID; set later if appropriate 751 -1, // don't yet know tab ID; set later if appropriate
752 ClassifyPage(), 752 ClassifyPage(),
753 elapsed_time_since_user_first_modified_omnibox, 753 elapsed_time_since_user_first_modified_omnibox,
754 match.inline_autocompletion.length(), 754 match.allowed_to_be_default_match ? match.inline_autocompletion.length() :
755 base::string16::npos,
755 elapsed_time_since_last_change_to_default_match, 756 elapsed_time_since_last_change_to_default_match,
756 (!popup_model()->IsOpen() || !pasted_text.empty()) ? 757 (!popup_model()->IsOpen() || !pasted_text.empty()) ?
757 fake_single_entry_result : result()); 758 fake_single_entry_result : result());
758 DCHECK(!popup_model()->IsOpen() || !pasted_text.empty() || 759 DCHECK(!popup_model()->IsOpen() || !pasted_text.empty() ||
759 (log.elapsed_time_since_user_first_modified_omnibox >= 760 (log.elapsed_time_since_user_first_modified_omnibox >=
760 log.elapsed_time_since_last_change_to_default_match)) 761 log.elapsed_time_since_last_change_to_default_match))
761 << "We should've got the notification that the user modified the " 762 << "We should've got the notification that the user modified the "
762 << "omnibox text at same time or before the most recent time the " 763 << "omnibox text at same time or before the most recent time the "
763 << "default match changed."; 764 << "default match changed.";
764 765
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 // Update state and notify view if the omnibox has focus and the caret 1462 // Update state and notify view if the omnibox has focus and the caret
1462 // visibility changed. 1463 // visibility changed.
1463 const bool was_caret_visible = is_caret_visible(); 1464 const bool was_caret_visible = is_caret_visible();
1464 focus_state_ = state; 1465 focus_state_ = state;
1465 if (focus_state_ != OMNIBOX_FOCUS_NONE && 1466 if (focus_state_ != OMNIBOX_FOCUS_NONE &&
1466 is_caret_visible() != was_caret_visible) 1467 is_caret_visible() != was_caret_visible)
1467 view_->ApplyCaretVisibility(); 1468 view_->ApplyCaretVisibility();
1468 1469
1469 delegate_->OnFocusChanged(focus_state_, reason); 1470 delegate_->OnFocusChanged(focus_state_, reason);
1470 } 1471 }
OLDNEW
« no previous file with comments | « chrome/browser/omnibox/omnibox_log.h ('k') | components/metrics/proto/omnibox_event.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698