summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history
diff options
context:
space:
mode:
authormaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 21:07:27 +0000
committermaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 21:07:27 +0000
commitd3216441b7726c31fb0ae9b9d90b64421e14ca39 (patch)
tree653882df34541ec7aa37e4024f8fce27fd9ba5b6 /chrome/browser/history
parentba61ace67a08e56026d2e8034d7a938d2f8e5bd6 (diff)
downloadchromium_src-d3216441b7726c31fb0ae9b9d90b64421e14ca39.zip
chromium_src-d3216441b7726c31fb0ae9b9d90b64421e14ca39.tar.gz
chromium_src-d3216441b7726c31fb0ae9b9d90b64421e14ca39.tar.bz2
NO CODE CHANGE.
Split the lines >80 cols. (Part 1) Review URL: http://codereview.chromium.org/39206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history')
-rw-r--r--chrome/browser/history/download_database.cc7
-rw-r--r--chrome/browser/history/history.cc6
-rw-r--r--chrome/browser/history/in_memory_history_backend.cc4
-rw-r--r--chrome/browser/history/query_parser_unittest.cc12
-rw-r--r--chrome/browser/history/text_database_unittest.cc9
-rw-r--r--chrome/browser/history/url_database.cc3
-rw-r--r--chrome/browser/history/visit_database.cc3
7 files changed, 30 insertions, 14 deletions
diff --git a/chrome/browser/history/download_database.cc b/chrome/browser/history/download_database.cc
index 5c34ef4..996e1199 100644
--- a/chrome/browser/history/download_database.cc
+++ b/chrome/browser/history/download_database.cc
@@ -55,7 +55,8 @@ bool DownloadDatabase::DropDownloadTable() {
SQLITE_OK;
}
-void DownloadDatabase::QueryDownloads(std::vector<DownloadCreateInfo>* results) {
+void DownloadDatabase::QueryDownloads(
+ std::vector<DownloadCreateInfo>* results) {
results->clear();
SQLITE_UNIQUE_STATEMENT(statement, GetStatementCache(),
@@ -156,7 +157,9 @@ void DownloadDatabase::RemoveDownloadsBetween(Time delete_begin,
time_t start_time = delete_begin.ToTimeT();
time_t end_time = delete_end.ToTimeT();
statement->bind_int64(0, start_time);
- statement->bind_int64(1, end_time ? end_time : std::numeric_limits<int64>::max());
+ statement->bind_int64(
+ 1,
+ end_time ? end_time : std::numeric_limits<int64>::max());
statement->bind_int(2, DownloadItem::COMPLETE);
statement->bind_int(3, DownloadItem::CANCELLED);
statement->step();
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
index 49707cf..2fe3669 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -99,7 +99,8 @@ HistoryService::HistoryService()
: thread_(new ChromeThread(ChromeThread::HISTORY)),
profile_(NULL),
backend_loaded_(false) {
- if (NotificationService::current()) { // Is NULL when running generate_profile.
+ // Is NULL when running generate_profile.
+ if (NotificationService::current()) {
NotificationService::current()->AddObserver(
this, NotificationType::HISTORY_URLS_DELETED,
Source<Profile>(profile_));
@@ -119,7 +120,8 @@ HistoryService::~HistoryService() {
Cleanup();
// Unregister for notifications.
- if (NotificationService::current()) { // Is NULL when running generate_profile.
+ // Is NULL when running generate_profile.
+ if (NotificationService::current()) {
NotificationService::current()->RemoveObserver(
this, NotificationType::HISTORY_URLS_DELETED,
Source<Profile>(profile_));
diff --git a/chrome/browser/history/in_memory_history_backend.cc b/chrome/browser/history/in_memory_history_backend.cc
index efcc317..93c6def 100644
--- a/chrome/browser/history/in_memory_history_backend.cc
+++ b/chrome/browser/history/in_memory_history_backend.cc
@@ -62,7 +62,9 @@ void InMemoryHistoryBackend::AttachToHistoryService(Profile* profile) {
registered_for_notifications_ = true;
NotificationService* service = NotificationService::current();
service->AddObserver(this, NotificationType::HISTORY_URL_VISITED, source);
- service->AddObserver(this, NotificationType::HISTORY_TYPED_URLS_MODIFIED, source);
+ service->AddObserver(this,
+ NotificationType::HISTORY_TYPED_URLS_MODIFIED,
+ source);
service->AddObserver(this, NotificationType::HISTORY_URLS_DELETED, source);
}
diff --git a/chrome/browser/history/query_parser_unittest.cc b/chrome/browser/history/query_parser_unittest.cc
index 6d425e91..d36fb68 100644
--- a/chrome/browser/history/query_parser_unittest.cc
+++ b/chrome/browser/history/query_parser_unittest.cc
@@ -46,10 +46,14 @@ TEST_F(QueryParserTest, SimpleQueries) {
// Quoted substring parsing.
TEST_F(QueryParserTest, Quoted) {
- EXPECT_EQ(L"\"Quoted\"", QueryToString(L"\"Quoted\"")); // ASCII quotes
- EXPECT_EQ(L"\"miss end\"", QueryToString(L"\"miss end")); // Missing end quotes
- EXPECT_EQ(L"miss* beg*", QueryToString(L"miss beg\"")); // Missing begin quotes
- EXPECT_EQ(L"\"Many\" \"quotes\"", QueryToString(L"\"Many \"\"quotes")); // Weird formatting
+ // ASCII quotes
+ EXPECT_EQ(L"\"Quoted\"", QueryToString(L"\"Quoted\""));
+ // Missing end quotes
+ EXPECT_EQ(L"\"miss end\"", QueryToString(L"\"miss end"));
+ // Missing begin quotes
+ EXPECT_EQ(L"miss* beg*", QueryToString(L"miss beg\""));
+ // Weird formatting
+ EXPECT_EQ(L"\"Many\" \"quotes\"", QueryToString(L"\"Many \"\"quotes"));
}
// Apostrophes within words should be preserved, but otherwise stripped.
diff --git a/chrome/browser/history/text_database_unittest.cc b/chrome/browser/history/text_database_unittest.cc
index 4967f2f6..9da2b7c 100644
--- a/chrome/browser/history/text_database_unittest.cc
+++ b/chrome/browser/history/text_database_unittest.cc
@@ -21,14 +21,16 @@ namespace {
const char kURL1[] = "http://www.google.com/";
const int kTime1 = 1000;
const char kTitle1[] = "Google";
-const char kBody1[] = "COUNTTAG Web Images Maps News Shopping Gmail more My Account | "
+const char kBody1[] =
+ "COUNTTAG Web Images Maps News Shopping Gmail more My Account | "
"Sign out Advanced Search Preferences Language Tools Advertising Programs "
"- Business Solutions - About Google, 2008 Google";
const char kURL2[] = "http://images.google.com/";
const int kTime2 = 2000;
const char kTitle2[] = "Google Image Search";
-const char kBody2[] = "COUNTTAG Web Images Maps News Shopping Gmail more My Account | "
+const char kBody2[] =
+ "COUNTTAG Web Images Maps News Shopping Gmail more My Account | "
"Sign out Advanced Image Search Preferences The most comprehensive image "
"search on the web. Want to help improve Google Image Search? Try Google "
"Image Labeler. Advertising Programs - Business Solutions - About Google "
@@ -37,7 +39,8 @@ const char kBody2[] = "COUNTTAG Web Images Maps News Shopping Gmail more My Acco
const char kURL3[] = "http://slashdot.org/";
const int kTime3 = 3000;
const char kTitle3[] = "Slashdot: News for nerds, stuff that matters";
-const char kBody3[] = "COUNTTAG Slashdot Log In Create Account Subscribe Firehose Why "
+const char kBody3[] =
+ "COUNTTAG Slashdot Log In Create Account Subscribe Firehose Why "
"Log In? Why Subscribe? Nickname Password Public Terminal Sections "
"Main Apple AskSlashdot Backslash Books Developers Games Hardware "
"Interviews IT Linux Mobile Politics Science YRO";
diff --git a/chrome/browser/history/url_database.cc b/chrome/browser/history/url_database.cc
index 6db3b10..520906d 100644
--- a/chrome/browser/history/url_database.cc
+++ b/chrome/browser/history/url_database.cc
@@ -475,7 +475,8 @@ void URLDatabase::CreateMainURLIndex() {
void URLDatabase::CreateSupplimentaryURLIndices() {
// Add a favicon index. This is useful when we delete urls.
- sqlite3_exec(GetDB(), "CREATE INDEX urls_favicon_id_INDEX ON urls (favicon_id)",
+ sqlite3_exec(GetDB(),
+ "CREATE INDEX urls_favicon_id_INDEX ON urls (favicon_id)",
NULL, NULL, NULL);
}
diff --git a/chrome/browser/history/visit_database.cc b/chrome/browser/history/visit_database.cc
index 9fd02ec..6a7497d 100644
--- a/chrome/browser/history/visit_database.cc
+++ b/chrome/browser/history/visit_database.cc
@@ -36,7 +36,8 @@ bool VisitDatabase::InitVisitTable() {
"from_visit INTEGER,"
"transition INTEGER DEFAULT 0 NOT NULL,"
"segment_id INTEGER,"
- "is_indexed BOOLEAN)", // True when we have indexed data for this visit.
+ // True when we have indexed data for this visit.
+ "is_indexed BOOLEAN)",
NULL, NULL, NULL) != SQLITE_OK)
return false;
} else if (!DoesSqliteColumnExist(GetDB(), "visits",