Chromium Code Reviews

Side by Side Diff: chrome/browser/history/url_database.h

Issue 6135001: Makes the in memory db update rows that have search terms associated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve comments and forward declare Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_HISTORY_URL_DATABASE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_URL_DATABASE_H_
6 #define CHROME_BROWSER_HISTORY_URL_DATABASE_H_ 6 #define CHROME_BROWSER_HISTORY_URL_DATABASE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "app/sql/statement.h" 9 #include "app/sql/statement.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 147 matching lines...)
158 bool allow_base, 158 bool allow_base,
159 history::URLRow* info); 159 history::URLRow* info);
160 160
161 // Keyword Search Terms ------------------------------------------------------ 161 // Keyword Search Terms ------------------------------------------------------
162 162
163 // Sets the search terms for the specified url/keyword pair. 163 // Sets the search terms for the specified url/keyword pair.
164 bool SetKeywordSearchTermsForURL(URLID url_id, 164 bool SetKeywordSearchTermsForURL(URLID url_id,
165 TemplateURLID keyword_id, 165 TemplateURLID keyword_id,
166 const string16& term); 166 const string16& term);
167 167
168 // Looks up a keyword search term given a url id. Fills row with the data.
169 // Returns true on success and false otherwise.
170 bool GetKeywordSearchTermRow(URLID url_id, KeywordSearchTermRow* row);
171
168 // Deletes all search terms for the specified keyword that have been added by 172 // Deletes all search terms for the specified keyword that have been added by
169 // way of SetKeywordSearchTermsForURL. 173 // way of SetKeywordSearchTermsForURL.
170 void DeleteAllSearchTermsForKeyword(TemplateURLID keyword_id); 174 void DeleteAllSearchTermsForKeyword(TemplateURLID keyword_id);
171 175
172 // Returns up to max_count of the most recent search terms for the specified 176 // Returns up to max_count of the most recent search terms for the specified
173 // keyword. 177 // keyword.
174 void GetMostRecentKeywordSearchTerms( 178 void GetMostRecentKeywordSearchTerms(
175 TemplateURLID keyword_id, 179 TemplateURLID keyword_id,
176 const string16& prefix, 180 const string16& prefix,
177 int max_count, 181 int max_count,
(...skipping 77 matching lines...)
255 // the macro if you want to put this in the middle of an otherwise constant 259 // the macro if you want to put this in the middle of an otherwise constant
256 // string, it will save time doing string appends. If you have to build a SQL 260 // string, it will save time doing string appends. If you have to build a SQL
257 // string dynamically anyway, use the constant, it will save space. 261 // string dynamically anyway, use the constant, it will save space.
258 #define HISTORY_URL_ROW_FIELDS \ 262 #define HISTORY_URL_ROW_FIELDS \
259 " urls.id, urls.url, urls.title, urls.visit_count, urls.typed_count, " \ 263 " urls.id, urls.url, urls.title, urls.visit_count, urls.typed_count, " \
260 "urls.last_visit_time, urls.hidden, urls.favicon_id " 264 "urls.last_visit_time, urls.hidden, urls.favicon_id "
261 265
262 } // history 266 } // history
263 267
264 #endif // CHROME_BROWSER_HISTORY_URL_DATABASE_H_ 268 #endif // CHROME_BROWSER_HISTORY_URL_DATABASE_H_
OLDNEW

Powered by Google App Engine