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

Side by Side Diff: chrome/browser/history/in_memory_history_backend.cc

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/history/in_memory_history_backend.h" 5 #include "chrome/browser/history/in_memory_history_backend.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 source); 72 source);
73 registrar_.Add(this, chrome::NOTIFICATION_TEMPLATE_URL_REMOVED, source); 73 registrar_.Add(this, chrome::NOTIFICATION_TEMPLATE_URL_REMOVED, source);
74 } 74 }
75 75
76 void InMemoryHistoryBackend::Observe(int type, 76 void InMemoryHistoryBackend::Observe(int type,
77 const NotificationSource& source, 77 const NotificationSource& source,
78 const NotificationDetails& details) { 78 const NotificationDetails& details) {
79 switch (type) { 79 switch (type) {
80 case chrome::NOTIFICATION_HISTORY_URL_VISITED: { 80 case chrome::NOTIFICATION_HISTORY_URL_VISITED: {
81 Details<history::URLVisitedDetails> visited_details(details); 81 Details<history::URLVisitedDetails> visited_details(details);
82 PageTransition::Type primary_type = 82 content::PageTransition primary_type =
83 PageTransition::StripQualifier(visited_details->transition); 83 content::PageTransitionStripQualifier(visited_details->transition);
84 if (visited_details->row.typed_count() > 0 || 84 if (visited_details->row.typed_count() > 0 ||
85 primary_type == PageTransition::KEYWORD || 85 primary_type == content::PAGE_TRANSITION_KEYWORD ||
86 HasKeyword(visited_details->row.url())) { 86 HasKeyword(visited_details->row.url())) {
87 URLsModifiedDetails modified_details; 87 URLsModifiedDetails modified_details;
88 modified_details.changed_urls.push_back(visited_details->row); 88 modified_details.changed_urls.push_back(visited_details->row);
89 OnTypedURLsModified(modified_details); 89 OnTypedURLsModified(modified_details);
90 } 90 }
91 break; 91 break;
92 } 92 }
93 case chrome::NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED: 93 case chrome::NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED:
94 OnKeywordSearchTermUpdated( 94 OnKeywordSearchTermUpdated(
95 *Details<history::KeywordSearchTermDetails>(details).ptr()); 95 *Details<history::KeywordSearchTermDetails>(details).ptr());
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 bool InMemoryHistoryBackend::HasKeyword(const GURL& url) { 188 bool InMemoryHistoryBackend::HasKeyword(const GURL& url) {
189 URLID id = db_->GetRowForURL(url, NULL); 189 URLID id = db_->GetRowForURL(url, NULL);
190 if (!id) 190 if (!id)
191 return false; 191 return false;
192 192
193 return db_->GetKeywordSearchTermRow(id, NULL); 193 return db_->GetKeywordSearchTermRow(id, NULL);
194 } 194 }
195 195
196 } // namespace history 196 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/history/text_database_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698