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

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

Issue 18866003: Add histogram Omnibox.FocusToEditTime for time in milliseconds between a user focus and edit. (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 5 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
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 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 // not yet accepted them. We use this to determine when we need to save 437 // not yet accepted them. We use this to determine when we need to save
438 // state (on switching tabs) and whether changes to the page URL should be 438 // state (on switching tabs) and whether changes to the page URL should be
439 // immediately displayed. 439 // immediately displayed.
440 // This flag will be true in a superset of the cases where the popup is open. 440 // This flag will be true in a superset of the cases where the popup is open.
441 bool user_input_in_progress_; 441 bool user_input_in_progress_;
442 442
443 // The text that the user has entered. This does not include inline 443 // The text that the user has entered. This does not include inline
444 // autocomplete text that has not yet been accepted. 444 // autocomplete text that has not yet been accepted.
445 string16 user_text_; 445 string16 user_text_;
446 446
447 // We keep track of when the user last focused on the omnibox.
448 base::TimeTicks time_user_last_focused_on_omnibox_;
449
447 // We keep track of when the user began modifying the omnibox text. 450 // We keep track of when the user began modifying the omnibox text.
448 // This should be valid whenever user_input_in_progress_ is true. 451 // This should be valid whenever user_input_in_progress_ is true.
449 base::TimeTicks time_user_first_modified_omnibox_; 452 base::TimeTicks time_user_first_modified_omnibox_;
450 453
451 // When the user closes the popup, we need to remember the URL for their 454 // When the user closes the popup, we need to remember the URL for their
452 // desired choice, so that if they hit enter without reopening the popup we 455 // desired choice, so that if they hit enter without reopening the popup we
453 // know where to go. We could simply rerun autocomplete in this case, but 456 // know where to go. We could simply rerun autocomplete in this case, but
454 // we'd need to either wait for all results to come in (unacceptably slow) or 457 // we'd need to either wait for all results to come in (unacceptably slow) or
455 // do the wrong thing when the user had chosen some provider whose results 458 // do the wrong thing when the user had chosen some provider whose results
456 // were not returned instantaneously. 459 // were not returned instantaneously.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 // an exact keyword match. If this is true then keyword mode will be 564 // an exact keyword match. If this is true then keyword mode will be
562 // triggered automatically if the input is "<keyword> <search string>". We 565 // triggered automatically if the input is "<keyword> <search string>". We
563 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. 566 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true.
564 // This has no effect if we're already in keyword mode. 567 // This has no effect if we're already in keyword mode.
565 bool allow_exact_keyword_match_; 568 bool allow_exact_keyword_match_;
566 569
567 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); 570 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel);
568 }; 571 };
569 572
570 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 573 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698