Index: chrome/browser/autocomplete/autocomplete_match.h |
=================================================================== |
--- chrome/browser/autocomplete/autocomplete_match.h (revision 148107) |
+++ chrome/browser/autocomplete/autocomplete_match.h (working copy) |
@@ -5,6 +5,7 @@ |
#ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ |
#define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ |
+#include <map> |
#include <string> |
#include <vector> |
@@ -17,6 +18,10 @@ |
class Profile; |
class TemplateURL; |
+namespace base { |
+class Time; |
+} // namespace base |
+ |
// AutocompleteMatch ---------------------------------------------------------- |
// A single result line with classified spans. The autocomplete popup displays |
@@ -189,6 +194,11 @@ |
// TemplateURL. See comments on |keyword| below. |
TemplateURL* GetTemplateURL(Profile* profile) const; |
+ // Adds diagnostic information to the |diagnostics| dictionary. |
Peter Kasting
2012/07/26 02:31:37
Nit: Up to you, but I think "optional info" might
mrossetti
2012/07/26 23:17:13
I like that idea but I used |additional_info| -- I
|
+ void RecordDiagnostic(const std::string& property, const std::string& value); |
+ void RecordDiagnostic(const std::string& property, int value); |
+ void RecordDiagnostic(const std::string& property, const base::Time& value); |
+ |
// The provider of this match, used to remember which provider the user had |
// selected when the input changes. This may be NULL, in which case there is |
// no provider (or memory of the user's selection). |
@@ -283,6 +293,11 @@ |
// AutocompleteController to do no additional transformations. |
scoped_ptr<TemplateURLRef::SearchTermsArgs> search_terms_args; |
+ // Diagnostic information dictionary into which each provider can optionally |
+ // record a property and associated value and which is presented in |
+ // chrome://omnibox. |
+ std::map<std::string, std::string> diagnostics; |
Peter Kasting
2012/07/26 02:31:37
Nit: Might want a "typedef std::map<std::string, s
mrossetti
2012/07/26 23:17:13
Done.
|
+ |
#ifndef NDEBUG |
// Does a data integrity check on this match. |
void Validate() const; |