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

Unified Diff: chrome/browser/common/url_database/url_database.h

Issue 10948045: introduce chrome/browser/common directory and move url_database(and its dependencies) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/common/url_database/url_database.h
===================================================================
--- chrome/browser/common/url_database/url_database.h (revision 0)
+++ chrome/browser/common/url_database/url_database.h (working copy)
@@ -2,15 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_URL_DATABASE_H_
-#define CHROME_BROWSER_HISTORY_URL_DATABASE_H_
+#ifndef CHROME_BROWSER_COMMON_URL_DATABASE_URL_DATABASE_H_
+#define CHROME_BROWSER_COMMON_URL_DATABASE_URL_DATABASE_H_
#include "base/basictypes.h"
-#include "chrome/browser/history/history_types.h"
-#include "chrome/browser/search_engines/template_url_id.h"
+#include "chrome/browser/common/url_database/template_url_id.h"
+#include "chrome/browser/common/url_database/url_database_types.h"
#include "sql/statement.h"
class GURL;
+class IconMapping;
namespace sql {
class Connection;
@@ -18,8 +19,6 @@
namespace history {
-class VisitDatabase; // For friend statement.
-
// Encapsulates an SQL database that holds URL info. This is a subset of the
// full history data. We split this class' functionality out from the larger
// HistoryDatabase class to support maintaining separate databases of URLs with
@@ -131,7 +130,7 @@
URLEnumerator();
// Retreives the next url. Returns false if no more urls are available
- bool GetNextURL(history::URLRow* r);
+ bool GetNextURL(URLRow* r);
private:
DISALLOW_COPY_AND_ASSIGN(URLEnumerator);
@@ -187,7 +186,7 @@
int min_visits,
int min_typed,
bool allow_base,
- history::URLRow* info);
+ URLRow* info);
// Keyword Search Terms ------------------------------------------------------
@@ -222,7 +221,7 @@
// Migration -----------------------------------------------------------------
- // Do to a bug we were setting the favicon of about:blank. This forces
+ // Due to a bug we were setting the favicon of about:blank. This forces
// about:blank to have no icon or title. Returns true on success, false if
// the favicon couldn't be updated.
bool MigrateFromVersion11ToVersion12();
@@ -233,9 +232,7 @@
IconMappingEnumerator* enumerator);
protected:
- friend class VisitDatabase;
-
- // See HISTORY_URL_ROW_FIELDS below.
+ // See URL_DATABASE_ROW_FIELDS below.
static const char kURLRowFields[];
// The number of fiends in kURLRowFields. If callers need additional
@@ -292,6 +289,8 @@
DISALLOW_COPY_AND_ASSIGN(URLDatabase);
};
+} // namespace history
+
// The fields and order expected by FillURLRow(). ID is guaranteed to be first
// so that DISTINCT can be prepended to get distinct URLs.
//
@@ -299,10 +298,8 @@
// the macro if you want to put this in the middle of an otherwise constant
// string, it will save time doing string appends. If you have to build a SQL
// string dynamically anyway, use the constant, it will save space.
-#define HISTORY_URL_ROW_FIELDS \
+#define URL_DATABASE_ROW_FIELDS \
" urls.id, urls.url, urls.title, urls.visit_count, urls.typed_count, " \
"urls.last_visit_time, urls.hidden "
-} // history
-
-#endif // CHROME_BROWSER_HISTORY_URL_DATABASE_H_
+#endif // CHROME_BROWSER_COMMON_URL_DATABASE_URL_DATABASE_H_
« no previous file with comments | « chrome/browser/common/url_database/template_url_id.h ('k') | chrome/browser/common/url_database/url_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698