summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-14 16:53:41 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-14 16:53:41 +0000
commit038d52e1cd7f5ec3eda5c18b4c4437c372ec9c04 (patch)
treece06e8884aebf474fcb02170d3af0334567fa8f4 /chrome/browser/history
parentd76d4ebac33dd9df8c3aa361b7902e0a934fde4d (diff)
downloadchromium_src-038d52e1cd7f5ec3eda5c18b4c4437c372ec9c04.zip
chromium_src-038d52e1cd7f5ec3eda5c18b4c4437c372ec9c04.tar.gz
chromium_src-038d52e1cd7f5ec3eda5c18b4c4437c372ec9c04.tar.bz2
More style nits.
(Working on cleaning chrome/ so hopefully we can lint it by default.) Review URL: http://codereview.chromium.org/274040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history')
-rw-r--r--chrome/browser/history/history_backend_unittest.cc6
-rw-r--r--chrome/browser/history/history_types.cc1
-rw-r--r--chrome/browser/history/page_usage_data.cc2
-rw-r--r--chrome/browser/history/query_parser.cc3
-rw-r--r--chrome/browser/history/snippet_unittest.cc21
-rw-r--r--chrome/browser/history/starred_url_database.cc2
-rw-r--r--chrome/browser/history/url_database_unittest.cc10
-rw-r--r--chrome/browser/history/visit_log_unittest.cc2
-rw-r--r--chrome/browser/history/visit_tracker_unittest.cc12
9 files changed, 29 insertions, 30 deletions
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index bb92d19..7270a3d 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -485,18 +485,18 @@ TEST_F(HistoryBackendTest, ClientRedirect) {
// Initial transition to page A.
GURL url_a("http://google.com/a");
- AddClientRedirect(GURL(), url_a, false, &transition1, &transition2);
+ AddClientRedirect(GURL(), url_a, false, &transition1, &transition2);
EXPECT_TRUE(transition2 & PageTransition::CHAIN_END);
// User initiated redirect to page B.
GURL url_b("http://google.com/b");
- AddClientRedirect(url_a, url_b, false, &transition1, &transition2);
+ AddClientRedirect(url_a, url_b, false, &transition1, &transition2);
EXPECT_TRUE(transition1 & PageTransition::CHAIN_END);
EXPECT_TRUE(transition2 & PageTransition::CHAIN_END);
// Non-user initiated redirect to page C.
GURL url_c("http://google.com/c");
- AddClientRedirect(url_b, url_c, true, &transition1, &transition2);
+ AddClientRedirect(url_b, url_c, true, &transition1, &transition2);
EXPECT_FALSE(transition1 & PageTransition::CHAIN_END);
EXPECT_TRUE(transition2 & PageTransition::CHAIN_END);
}
diff --git a/chrome/browser/history/history_types.cc b/chrome/browser/history/history_types.cc
index cd16063..aadd0af 100644
--- a/chrome/browser/history/history_types.cc
+++ b/chrome/browser/history/history_types.cc
@@ -198,7 +198,6 @@ void QueryResults::DeleteRange(size_t begin, size_t end) {
// Remove this referece from the list.
found->second->erase(found->second->begin() + match);
match--;
-
}
}
diff --git a/chrome/browser/history/page_usage_data.cc b/chrome/browser/history/page_usage_data.cc
index 643f1a6..f202538 100644
--- a/chrome/browser/history/page_usage_data.cc
+++ b/chrome/browser/history/page_usage_data.cc
@@ -28,7 +28,7 @@ void PageUsageData::SetFavIcon(SkBitmap* img) {
favicon_set_ = true;
}
-//static
+// static
bool PageUsageData::Predicate(const PageUsageData* lhs,
const PageUsageData* rhs) {
return lhs->GetScore() > rhs->GetScore();
diff --git a/chrome/browser/history/query_parser.cc b/chrome/browser/history/query_parser.cc
index f17dad6..6bfaa7f 100644
--- a/chrome/browser/history/query_parser.cc
+++ b/chrome/browser/history/query_parser.cc
@@ -66,7 +66,8 @@ void CoalseAndSortMatchPositions(Snippet::MatchPositions* matches) {
// A QueryNodeWord is a single word in the query.
class QueryNodeWord : public QueryNode {
public:
- QueryNodeWord(const std::wstring& word) : word_(word), literal_(false) {}
+ explicit QueryNodeWord(const std::wstring& word)
+ : word_(word), literal_(false) {}
virtual ~QueryNodeWord() {}
virtual int AppendToSQLiteQuery(std::wstring* query) const;
virtual bool IsWord() const { return true; }
diff --git a/chrome/browser/history/snippet_unittest.cc b/chrome/browser/history/snippet_unittest.cc
index cfc935c..aa9aa2e 100644
--- a/chrome/browser/history/snippet_unittest.cc
+++ b/chrome/browser/history/snippet_unittest.cc
@@ -25,7 +25,6 @@ const char* kSampleDocument = "Google\xe2\x84\xa2 Terms of Service "
"Amphitheatre Parkway, Mountain View, CA 94043, United States. This document "
"explains how the agreement is made up, and sets out some of the terms of "
"that agreement.";
-
};
// Thai sample taken from http://www.google.co.th/intl/th/privacy.html
@@ -228,16 +227,16 @@ TEST(Snippets, ExtractMatchPositions) {
const size_t expected_match_count;
const size_t expected_matches[10];
} data[] = {
- { "0 0 1 2 0 0 4 1 0 0 1 5", 1, { 1,6 } },
- { "0 0 1 4 0 0 2 1", 1, { 1,5 } },
- { "0 0 4 1 0 0 2 1", 2, { 2,3, 4,5 } },
- { "0 0 0 1", 1, { 0,1 } },
- { "0 0 0 1 0 0 0 2", 1, { 0,2 } },
- { "0 0 1 1 0 0 1 2", 1, { 1,3 } },
- { "0 0 1 2 0 0 4 3 0 0 3 1", 1, { 1,7 } },
- { "0 0 1 4 0 0 2 5", 1, { 1,7 } },
- { "0 0 1 2 0 0 1 1", 1, { 1,3 } },
- { "0 0 1 1 0 0 5 2 0 0 10 1 0 0 3 10", 2, { 1,2, 3,13 } },
+ { "0 0 1 2 0 0 4 1 0 0 1 5", 1, { 1, 6 } },
+ { "0 0 1 4 0 0 2 1", 1, { 1, 5 } },
+ { "0 0 4 1 0 0 2 1", 2, { 2, 3, 4, 5 } },
+ { "0 0 0 1", 1, { 0, 1 } },
+ { "0 0 0 1 0 0 0 2", 1, { 0, 2 } },
+ { "0 0 1 1 0 0 1 2", 1, { 1, 3 } },
+ { "0 0 1 2 0 0 4 3 0 0 3 1", 1, { 1, 7 } },
+ { "0 0 1 4 0 0 2 5", 1, { 1, 7 } },
+ { "0 0 1 2 0 0 1 1", 1, { 1, 3 } },
+ { "0 0 1 1 0 0 5 2 0 0 10 1 0 0 3 10", 2, { 1, 2, 3, 13 } },
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) {
Snippet::MatchPositions matches;
diff --git a/chrome/browser/history/starred_url_database.cc b/chrome/browser/history/starred_url_database.cc
index 7c77574..31e659c 100644
--- a/chrome/browser/history/starred_url_database.cc
+++ b/chrome/browser/history/starred_url_database.cc
@@ -380,7 +380,7 @@ bool StarredURLDatabase::BuildStarNodes(
StarredNode* node = group_id_to_node_map[star_entries[i].group_id];
if (!node->HasAncestor(parent) && !parent->HasAncestor(node)) {
parent->Add(parent->GetChildCount(), node);
- } else{
+ } else {
// The node has a cycle. Add it to the list of roots so the cycle is
// broken.
roots->insert(node);
diff --git a/chrome/browser/history/url_database_unittest.cc b/chrome/browser/history/url_database_unittest.cc
index 0f0be54..d6dc43f 100644
--- a/chrome/browser/history/url_database_unittest.cc
+++ b/chrome/browser/history/url_database_unittest.cc
@@ -112,13 +112,13 @@ TEST_F(URLDatabaseTest, AddURL) {
EXPECT_EQ(0, GetRowForURL(GURL("http://news.google.com/"), &info));
// Delete all urls in the domain
- // FIXME(ACW) test the new url based delete domain
- //EXPECT_TRUE(db.DeleteDomain(kDomainID));
+ // TODO(acw): test the new url based delete domain
+ // EXPECT_TRUE(db.DeleteDomain(kDomainID));
// Make sure the urls have been properly removed
- // FIXME(ACW) commented out because remove no longer works.
- //EXPECT_TRUE(db.GetURLInfo(url1, NULL) == NULL);
- //EXPECT_TRUE(db.GetURLInfo(url2, NULL) == NULL);
+ // TODO(acw): commented out because remove no longer works.
+ // EXPECT_TRUE(db.GetURLInfo(url1, NULL) == NULL);
+ // EXPECT_TRUE(db.GetURLInfo(url2, NULL) == NULL);
}
// Tests adding, querying and deleting keyword visits.
diff --git a/chrome/browser/history/visit_log_unittest.cc b/chrome/browser/history/visit_log_unittest.cc
index 5389281..c69f051 100644
--- a/chrome/browser/history/visit_log_unittest.cc
+++ b/chrome/browser/history/visit_log_unittest.cc
@@ -18,7 +18,7 @@ TEST(VisitLog, SimpleRecording) {
ASSERT_EQ(history::VisitLog::NO_OP, vlog_buffer[2]);
ASSERT_EQ(history::VisitLog::NO_OP, vlog_buffer[vlog_buffer_size-1]);
- for (int i=0; i<vlog_buffer_size; i++)
+ for (int i = 0; i < vlog_buffer_size; i++)
vlog.AddEvent(history::VisitLog::ADD_VISIT);
ASSERT_EQ(history::VisitLog::ADD_VISIT, vlog_buffer[0]);
diff --git a/chrome/browser/history/visit_tracker_unittest.cc b/chrome/browser/history/visit_tracker_unittest.cc
index 8676fbe..5c84d28 100644
--- a/chrome/browser/history/visit_tracker_unittest.cc
+++ b/chrome/browser/history/visit_tracker_unittest.cc
@@ -76,17 +76,17 @@ TEST(VisitTracker, SimpleTransitions) {
TEST(VisitTracker, Frames) {
VisitToTest test_frames[] = {
// Started here:
- {1, 1, "http://foo.com/", 1, "", 0},
+ {1, 1, "http://foo.com/", 1, "", 0},
// Which had an auto-loaded subframe:
- {1, 1, "http://foo.com/ad.html", 2, "http://foo.com/", 1},
+ {1, 1, "http://foo.com/ad.html", 2, "http://foo.com/", 1},
// ...and another auto-loaded subframe:
- {1, 1, "http://foo.com/ad2.html", 3, "http://foo.com/", 1},
+ {1, 1, "http://foo.com/ad2.html", 3, "http://foo.com/", 1},
// ...and the user navigated the first subframe to somwhere else
- {1, 2, "http://bar.com/", 4, "http://foo.com/ad.html", 2},
+ {1, 2, "http://bar.com/", 4, "http://foo.com/ad.html", 2},
// ...and then the second subframe somewhere else
- {1, 3, "http://fud.com/", 5, "http://foo.com/ad2.html",3},
+ {1, 3, "http://fud.com/", 5, "http://foo.com/ad2.html", 3},
// ...and then the main frame somewhere else.
- {1, 4, "http://www.google.com/", 6, "http://foo.com/", 1},
+ {1, 4, "http://www.google.com/", 6, "http://foo.com/", 1},
};
VisitTracker tracker;