| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/omnibox_metrics_provider.h" | 5 #include "chrome/browser/metrics/omnibox_metrics_provider.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 } | 153 } |
| 154 | 154 |
| 155 for (AutocompleteResult::const_iterator i(log.result.begin()); | 155 for (AutocompleteResult::const_iterator i(log.result.begin()); |
| 156 i != log.result.end(); ++i) { | 156 i != log.result.end(); ++i) { |
| 157 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion(); | 157 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion(); |
| 158 suggestion->set_provider(i->provider->AsOmniboxEventProviderType()); | 158 suggestion->set_provider(i->provider->AsOmniboxEventProviderType()); |
| 159 suggestion->set_result_type(AsOmniboxEventResultType(i->type)); | 159 suggestion->set_result_type(AsOmniboxEventResultType(i->type)); |
| 160 suggestion->set_relevance(i->relevance); | 160 suggestion->set_relevance(i->relevance); |
| 161 if (i->typed_count != -1) | 161 if (i->typed_count != -1) |
| 162 suggestion->set_typed_count(i->typed_count); | 162 suggestion->set_typed_count(i->typed_count); |
| 163 suggestion->set_is_starred(i->starred); | |
| 164 } | 163 } |
| 165 for (ProvidersInfo::const_iterator i(log.providers_info.begin()); | 164 for (ProvidersInfo::const_iterator i(log.providers_info.begin()); |
| 166 i != log.providers_info.end(); ++i) { | 165 i != log.providers_info.end(); ++i) { |
| 167 OmniboxEventProto::ProviderInfo* provider_info = | 166 OmniboxEventProto::ProviderInfo* provider_info = |
| 168 omnibox_event->add_provider_info(); | 167 omnibox_event->add_provider_info(); |
| 169 provider_info->CopyFrom(*i); | 168 provider_info->CopyFrom(*i); |
| 170 } | 169 } |
| 171 } | 170 } |
| OLD | NEW |