OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/search/search_terms_tracker.h" | 5 #include "chrome/browser/search/search_terms_tracker.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/search_engines/template_url_service_factory.h" | 8 #include "chrome/browser/search_engines/template_url_service_factory.h" |
9 #include "components/search_engines/template_url.h" | 9 #include "components/search_engines/template_url.h" |
10 #include "components/search_engines/template_url_service.h" | 10 #include "components/search_engines/template_url_service.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 105 } |
106 | 106 |
107 // We've found an SRP - stop searching (even if we did not record the | 107 // We've found an SRP - stop searching (even if we did not record the |
108 // search terms, as anything before this entry will be unrelated). | 108 // search terms, as anything before this entry will be unrelated). |
109 break; | 109 break; |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 // Do not consider any navigations that precede a non-web-triggerable | 113 // Do not consider any navigations that precede a non-web-triggerable |
114 // navigation as they are not related to those terms. | 114 // navigation as they are not related to those terms. |
115 if (!content::PageTransitionIsWebTriggerable( | 115 if (!ui::PageTransitionIsWebTriggerable( |
116 entry->GetTransitionType())) { | 116 entry->GetTransitionType())) { |
117 break; | 117 break; |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 return false; | 121 return false; |
122 } | 122 } |
123 | 123 |
124 void SearchTermsTracker::RemoveTabData( | 124 void SearchTermsTracker::RemoveTabData( |
125 const content::WebContents* contents) { | 125 const content::WebContents* contents) { |
126 TabState::iterator it = tabs_.find(contents); | 126 TabState::iterator it = tabs_.find(contents); |
127 if (it != tabs_.end()) { | 127 if (it != tabs_.end()) { |
128 tabs_.erase(it); | 128 tabs_.erase(it); |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 } // namespace chrome | 132 } // namespace chrome |
OLD | NEW |