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

Side by Side Diff: chrome/browser/metrics/metrics_log.cc

Issue 58003005: Modify Entity Suggestion support and Add Profile Suggest support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 7 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/metrics/metrics_log.h" 5 #include "chrome/browser/metrics/metrics_log.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 case AutocompleteMatchType::HISTORY_KEYWORD: 124 case AutocompleteMatchType::HISTORY_KEYWORD:
125 return OmniboxEventProto::Suggestion::HISTORY_KEYWORD; 125 return OmniboxEventProto::Suggestion::HISTORY_KEYWORD;
126 case AutocompleteMatchType::NAVSUGGEST: 126 case AutocompleteMatchType::NAVSUGGEST:
127 return OmniboxEventProto::Suggestion::NAVSUGGEST; 127 return OmniboxEventProto::Suggestion::NAVSUGGEST;
128 case AutocompleteMatchType::SEARCH_WHAT_YOU_TYPED: 128 case AutocompleteMatchType::SEARCH_WHAT_YOU_TYPED:
129 return OmniboxEventProto::Suggestion::SEARCH_WHAT_YOU_TYPED; 129 return OmniboxEventProto::Suggestion::SEARCH_WHAT_YOU_TYPED;
130 case AutocompleteMatchType::SEARCH_HISTORY: 130 case AutocompleteMatchType::SEARCH_HISTORY:
131 return OmniboxEventProto::Suggestion::SEARCH_HISTORY; 131 return OmniboxEventProto::Suggestion::SEARCH_HISTORY;
132 case AutocompleteMatchType::SEARCH_SUGGEST: 132 case AutocompleteMatchType::SEARCH_SUGGEST:
133 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST; 133 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST;
134 case AutocompleteMatchType::SEARCH_SUGGEST_ENTITY:
135 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_ENTITY;
136 case AutocompleteMatchType::SEARCH_SUGGEST_INFINITE:
137 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_INFINITE;
138 case AutocompleteMatchType::SEARCH_SUGGEST_PERSONALIZED:
139 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_PERSONALIZED;
140 case AutocompleteMatchType::SEARCH_SUGGEST_PROFILE:
141 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_PROFILE;
134 case AutocompleteMatchType::SEARCH_OTHER_ENGINE: 142 case AutocompleteMatchType::SEARCH_OTHER_ENGINE:
135 return OmniboxEventProto::Suggestion::SEARCH_OTHER_ENGINE; 143 return OmniboxEventProto::Suggestion::SEARCH_OTHER_ENGINE;
136 case AutocompleteMatchType::EXTENSION_APP: 144 case AutocompleteMatchType::EXTENSION_APP:
137 return OmniboxEventProto::Suggestion::EXTENSION_APP; 145 return OmniboxEventProto::Suggestion::EXTENSION_APP;
138 case AutocompleteMatchType::CONTACT: 146 case AutocompleteMatchType::CONTACT:
139 return OmniboxEventProto::Suggestion::CONTACT; 147 return OmniboxEventProto::Suggestion::CONTACT;
140 case AutocompleteMatchType::BOOKMARK_TITLE: 148 case AutocompleteMatchType::BOOKMARK_TITLE:
141 return OmniboxEventProto::Suggestion::BOOKMARK_TITLE; 149 return OmniboxEventProto::Suggestion::BOOKMARK_TITLE;
142 default: 150 default:
143 NOTREACHED(); 151 NOTREACHED();
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 1003
996 // We invalidate the user count if it changed while the log was open. 1004 // We invalidate the user count if it changed while the log was open.
997 if (system_profile->has_multi_profile_user_count() && 1005 if (system_profile->has_multi_profile_user_count() &&
998 user_count != system_profile->multi_profile_user_count()) 1006 user_count != system_profile->multi_profile_user_count())
999 user_count = 0; 1007 user_count = 0;
1000 1008
1001 system_profile->set_multi_profile_user_count(user_count); 1009 system_profile->set_multi_profile_user_count(user_count);
1002 } 1010 }
1003 } 1011 }
1004 #endif 1012 #endif
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/zero_suggest_provider.cc ('k') | chrome/common/autocomplete_match_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698