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

Side by Side Diff: chrome/browser/search/search_terms_tracker.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc ('k') | chrome/browser/search/search_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698