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

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

Issue 21452002: Add metric Omnibox.FocusToOpenTime for time from omnibox focus to omnibox usage. (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: synced Created 7 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/omnibox/omnibox_edit_model.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 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // not yet accepted them. We use this to determine when we need to save 417 // not yet accepted them. We use this to determine when we need to save
418 // state (on switching tabs) and whether changes to the page URL should be 418 // state (on switching tabs) and whether changes to the page URL should be
419 // immediately displayed. 419 // immediately displayed.
420 // This flag will be true in a superset of the cases where the popup is open. 420 // This flag will be true in a superset of the cases where the popup is open.
421 bool user_input_in_progress_; 421 bool user_input_in_progress_;
422 422
423 // The text that the user has entered. This does not include inline 423 // The text that the user has entered. This does not include inline
424 // autocomplete text that has not yet been accepted. 424 // autocomplete text that has not yet been accepted.
425 string16 user_text_; 425 string16 user_text_;
426 426
427 // We keep track of when the user last focused on the omnibox, but reset it 427 // We keep track of when the user last focused on the omnibox.
428 // to null when user input occurs. 428 base::TimeTicks last_omnibox_focus_;
429 base::TimeTicks last_omnibox_focus_without_user_input_; 429
430 // Whether any user input has occurred since focusing on the omnibox. This is
431 // used along with |last_omnibox_focus_| to calculate the time between a user
432 // focusing on the omnibox and editing. It is initialized to true since
433 // there was no focus event.
434 bool user_input_since_focus_;
430 435
431 // We keep track of when the user began modifying the omnibox text. 436 // We keep track of when the user began modifying the omnibox text.
432 // This should be valid whenever user_input_in_progress_ is true. 437 // This should be valid whenever user_input_in_progress_ is true.
433 base::TimeTicks time_user_first_modified_omnibox_; 438 base::TimeTicks time_user_first_modified_omnibox_;
434 439
435 // When the user closes the popup, we need to remember the URL for their 440 // When the user closes the popup, we need to remember the URL for their
436 // desired choice, so that if they hit enter without reopening the popup we 441 // desired choice, so that if they hit enter without reopening the popup we
437 // know where to go. We could simply rerun autocomplete in this case, but 442 // know where to go. We could simply rerun autocomplete in this case, but
438 // we'd need to either wait for all results to come in (unacceptably slow) or 443 // we'd need to either wait for all results to come in (unacceptably slow) or
439 // do the wrong thing when the user had chosen some provider whose results 444 // do the wrong thing when the user had chosen some provider whose results
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 // an exact keyword match. If this is true then keyword mode will be 512 // an exact keyword match. If this is true then keyword mode will be
508 // triggered automatically if the input is "<keyword> <search string>". We 513 // triggered automatically if the input is "<keyword> <search string>". We
509 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. 514 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true.
510 // This has no effect if we're already in keyword mode. 515 // This has no effect if we're already in keyword mode.
511 bool allow_exact_keyword_match_; 516 bool allow_exact_keyword_match_;
512 517
513 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); 518 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel);
514 }; 519 };
515 520
516 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 521 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698