summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/history/archived_database.h4
-rw-r--r--chrome/browser/history/download_types.h1
-rw-r--r--chrome/browser/history/expire_history_backend.cc27
-rw-r--r--chrome/browser/history/expire_history_backend.h28
-rw-r--r--chrome/browser/history/history.cc1
-rw-r--r--chrome/browser/history/history.h3
-rw-r--r--chrome/browser/history/history_backend.h5
-rw-r--r--chrome/browser/history/history_database.h6
-rw-r--r--chrome/browser/history/history_publisher.h10
-rw-r--r--chrome/browser/history/history_publisher_win.cc2
-rw-r--r--chrome/browser/history/history_types.cc4
-rw-r--r--chrome/browser/history/history_types.h4
-rw-r--r--chrome/browser/history/history_unittest.cc1
-rw-r--r--chrome/browser/history/in_memory_database.h5
-rw-r--r--chrome/browser/history/in_memory_history_backend.h3
-rw-r--r--chrome/browser/history/page_usage_data.cc24
-rw-r--r--chrome/browser/history/page_usage_data.h24
-rw-r--r--chrome/browser/history/query_parser.h2
-rw-r--r--chrome/browser/history/starred_url_database.h3
-rw-r--r--chrome/browser/history/text_database.cc1
-rw-r--r--chrome/browser/history/text_database.h2
-rw-r--r--chrome/browser/history/text_database_manager.cc1
-rw-r--r--chrome/browser/history/text_database_manager.h2
-rw-r--r--chrome/browser/history/text_database_manager_unittest.cc1
-rw-r--r--chrome/browser/history/thumbnail_database.h6
-rw-r--r--chrome/browser/history/visit_tracker.cc2
-rw-r--r--chrome/browser/history/visit_tracker.h2
-rw-r--r--chrome/browser/history/visitsegment_database.cc2
28 files changed, 97 insertions, 79 deletions
diff --git a/chrome/browser/history/archived_database.h b/chrome/browser/history/archived_database.h
index 5693091..f444477 100644
--- a/chrome/browser/history/archived_database.h
+++ b/chrome/browser/history/archived_database.h
@@ -6,14 +6,14 @@
#define CHROME_BROWSER_HISTORY_ARCHIVED_DATABASE_H_
#include "base/basictypes.h"
-#include "base/file_path.h"
-#include "chrome/browser/history/download_database.h"
#include "chrome/browser/history/url_database.h"
#include "chrome/browser/history/visit_database.h"
#include "chrome/browser/meta_table_helper.h"
struct sqlite3;
+class FilePath;
+
namespace history {
// Encapsulates the database operations for archived history.
diff --git a/chrome/browser/history/download_types.h b/chrome/browser/history/download_types.h
index 25e039a..d3c80ed 100644
--- a/chrome/browser/history/download_types.h
+++ b/chrome/browser/history/download_types.h
@@ -8,7 +8,6 @@
#define CHROME_BROWSER_DOWNLOAD_TYPES_H_
#include <string>
-#include <vector>
#include "base/basictypes.h"
#include "base/file_path.h"
diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc
index 7243aa3..3c1aff3 100644
--- a/chrome/browser/history/expire_history_backend.cc
+++ b/chrome/browser/history/expire_history_backend.cc
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/file_util.h"
+#include "base/message_loop.h"
#include "chrome/browser/bookmarks/bookmark_service.h"
#include "chrome/browser/history/archived_database.h"
#include "chrome/browser/history/history_database.h"
@@ -124,6 +125,32 @@ const int kExpirationEmptyDelayMin = 5;
} // namespace
+struct ExpireHistoryBackend::DeleteDependencies {
+ // The time range affected. These can be is_null() to be unbounded in one
+ // or both directions.
+ base::Time begin_time, end_time;
+
+ // ----- Filled by DeleteVisitRelatedInfo or manually if a function doesn't
+ // call that function. -----
+
+ // The unique URL rows affected by this delete.
+ std::map<URLID, URLRow> affected_urls;
+
+ // ----- Filled by DeleteOneURL -----
+
+ // The URLs deleted during this operation.
+ std::vector<URLRow> deleted_urls;
+
+ // The list of all favicon IDs that the affected URLs had. Favicons will be
+ // shared between all URLs with the same favicon, so this is the set of IDs
+ // that we will need to check when the delete operations are complete.
+ std::set<FavIconID> affected_favicons;
+
+ // Tracks the set of databases that have changed so we can optimize when
+ // when we're done.
+ TextDatabaseManager::ChangeSet text_db_changes;
+};
+
ExpireHistoryBackend::ExpireHistoryBackend(
BroadcastNotificationDelegate* delegate,
BookmarkService* bookmark_service)
diff --git a/chrome/browser/history/expire_history_backend.h b/chrome/browser/history/expire_history_backend.h
index 0b87b28..dc37044 100644
--- a/chrome/browser/history/expire_history_backend.h
+++ b/chrome/browser/history/expire_history_backend.h
@@ -14,7 +14,6 @@
#include "base/time.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/history/history_types.h"
-#include "chrome/browser/history/text_database_manager.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
class BookmarkService;
@@ -27,6 +26,7 @@ namespace history {
class ArchivedDatabase;
class HistoryDatabase;
struct HistoryDetails;
+class TextDatabaseManager;
class ThumbnailDatabase;
// Delegate used to broadcast notifications to the main thread.
@@ -103,31 +103,7 @@ class ExpireHistoryBackend {
FRIEND_TEST(ExpireHistoryTest, ExpiringVisitsReader);
friend class ::TestingProfile;
- struct DeleteDependencies {
- // The time range affected. These can be is_null() to be unbounded in one
- // or both directions.
- base::Time begin_time, end_time;
-
- // ----- Filled by DeleteVisitRelatedInfo or manually if a function doesn't
- // call that function. -----
-
- // The unique URL rows affected by this delete.
- std::map<URLID, URLRow> affected_urls;
-
- // ----- Filled by DeleteOneURL -----
-
- // The URLs deleted during this operation.
- std::vector<URLRow> deleted_urls;
-
- // The list of all favicon IDs that the affected URLs had. Favicons will be
- // shared between all URLs with the same favicon, so this is the set of IDs
- // that we will need to check when the delete operations are complete.
- std::set<FavIconID> affected_favicons;
-
- // Tracks the set of databases that have changed so we can optimize when
- // when we're done.
- TextDatabaseManager::ChangeSet text_db_changes;
- };
+ struct DeleteDependencies;
// Removes the data from the full text index associated with the given URL
// string/ID pair. If |update_visits| is set, the visits that reference the
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
index cbd6754..3be928c 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -48,6 +48,7 @@
#include "chrome/common/url_constants.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "third_party/skia/include/core/SkBitmap.h"
using base::Time;
using history::HistoryBackend;
diff --git a/chrome/browser/history/history.h b/chrome/browser/history/history.h
index edb446a..9aec250 100644
--- a/chrome/browser/history/history.h
+++ b/chrome/browser/history/history.h
@@ -5,13 +5,10 @@
#ifndef CHROME_BROWSER_HISTORY_HISTORY_H__
#define CHROME_BROWSER_HISTORY_HISTORY_H__
-#include <map>
#include <string>
#include <vector>
#include "base/basictypes.h"
-#include "base/gfx/rect.h"
-#include "base/lock.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index 2898b7e..36b5193 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -7,19 +7,14 @@
#include <utility>
-#include "base/gfx/rect.h"
#include "base/file_path.h"
-#include "base/lock.h"
#include "base/scoped_ptr.h"
-#include "base/scoped_vector.h"
-#include "base/task.h"
#include "chrome/browser/history/archived_database.h"
#include "chrome/browser/history/download_types.h"
#include "chrome/browser/history/expire_history_backend.h"
#include "chrome/browser/history/history_database.h"
#include "chrome/browser/history/history_marshaling.h"
#include "chrome/browser/history/history_types.h"
-#include "chrome/browser/history/page_usage_data.h"
#include "chrome/browser/history/text_database_manager.h"
#include "chrome/browser/history/thumbnail_database.h"
#include "chrome/browser/history/visit_tracker.h"
diff --git a/chrome/browser/history/history_database.h b/chrome/browser/history/history_database.h
index 55ca0f8..35d8595 100644
--- a/chrome/browser/history/history_database.h
+++ b/chrome/browser/history/history_database.h
@@ -5,20 +5,18 @@
#ifndef CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_
#define CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_
-#include "base/file_path.h"
#include "chrome/browser/history/download_database.h"
-#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/starred_url_database.h"
#include "chrome/browser/history/url_database.h"
#include "chrome/browser/history/visit_database.h"
#include "chrome/browser/history/visitsegment_database.h"
#include "chrome/browser/meta_table_helper.h"
-#include "chrome/common/sqlite_compiled_statement.h"
-#include "chrome/common/sqlite_utils.h"
struct sqlite3;
+class FilePath;
+
namespace history {
// Forward declaration for the temporary migration code in Init().
diff --git a/chrome/browser/history/history_publisher.h b/chrome/browser/history/history_publisher.h
index e44a19e..95b1893 100644
--- a/chrome/browser/history/history_publisher.h
+++ b/chrome/browser/history/history_publisher.h
@@ -8,15 +8,19 @@
#include <vector>
#include <string>
-#include "base/time.h"
-#include "chrome/browser/history/history_types.h"
-#include "googleurl/src/gurl.h"
+#include "base/basictypes.h"
#if defined(OS_WIN)
#include "base/scoped_comptr_win.h"
#include "history_indexer.h"
#endif
+class GURL;
+
+namespace base {
+class Time;
+}
+
namespace history {
class HistoryPublisher {
diff --git a/chrome/browser/history/history_publisher_win.cc b/chrome/browser/history/history_publisher_win.cc
index cdcc94c..54e9da4 100644
--- a/chrome/browser/history/history_publisher_win.cc
+++ b/chrome/browser/history/history_publisher_win.cc
@@ -11,6 +11,8 @@
#include "base/registry.h"
#include "base/scoped_comptr_win.h"
+#include "base/time.h"
+#include "googleurl/src/gurl.h"
namespace {
diff --git a/chrome/browser/history/history_types.cc b/chrome/browser/history/history_types.cc
index 4d42d60..cd16063 100644
--- a/chrome/browser/history/history_types.cc
+++ b/chrome/browser/history/history_types.cc
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/browser/history/history_types.h"
+
#include <limits>
-#include "chrome/browser/history/history_types.h"
+#include "base/stl_util-inl.h"
using base::Time;
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h
index 5be7581..38561b5 100644
--- a/chrome/browser/history/history_types.h
+++ b/chrome/browser/history/history_types.h
@@ -5,15 +5,13 @@
#ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__
#define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__
-#include <algorithm>
#include <map>
#include <set>
+#include <string>
#include <vector>
#include "base/basictypes.h"
-#include "base/gfx/rect.h"
#include "base/stack_container.h"
-#include "base/stl_util-inl.h"
#include "base/time.h"
#include "chrome/browser/history/snippet.h"
#include "chrome/common/page_transition_types.h"
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
index db6b941..23463440 100644
--- a/chrome/browser/history/history_unittest.cc
+++ b/chrome/browser/history/history_unittest.cc
@@ -43,6 +43,7 @@
#include "chrome/common/thumbnail_score.h"
#include "chrome/tools/profiles/thumbnail-inl.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/skia/include/core/SkBitmap.h"
using base::Time;
using base::TimeDelta;
diff --git a/chrome/browser/history/in_memory_database.h b/chrome/browser/history/in_memory_database.h
index 8b30ad83c..3d526fe 100644
--- a/chrome/browser/history/in_memory_database.h
+++ b/chrome/browser/history/in_memory_database.h
@@ -5,12 +5,15 @@
#ifndef CHROME_BROWSER_HISTORY_HISTORY_MEMORY_DB_H__
#define CHROME_BROWSER_HISTORY_HISTORY_MEMORY_DB_H__
+#include <string>
+
#include "base/basictypes.h"
#include "chrome/browser/history/url_database.h"
-#include "chrome/common/sqlite_compiled_statement.h"
struct sqlite3;
+class SqliteStatementCache;
+
namespace history {
// Class used for a fast in-memory cache of typed URLs. Used for inline
diff --git a/chrome/browser/history/in_memory_history_backend.h b/chrome/browser/history/in_memory_history_backend.h
index 4b6e747..131a444 100644
--- a/chrome/browser/history/in_memory_history_backend.h
+++ b/chrome/browser/history/in_memory_history_backend.h
@@ -17,7 +17,6 @@
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
-#include "chrome/browser/history/history_notifications.h"
#include "chrome/common/notification_registrar.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
@@ -27,6 +26,8 @@ class Profile;
namespace history {
class InMemoryDatabase;
+struct URLsDeletedDetails;
+struct URLsModifiedDetails;
class InMemoryHistoryBackend : public NotificationObserver {
public:
diff --git a/chrome/browser/history/page_usage_data.cc b/chrome/browser/history/page_usage_data.cc
index 64e6df2..643f1a6 100644
--- a/chrome/browser/history/page_usage_data.cc
+++ b/chrome/browser/history/page_usage_data.cc
@@ -2,9 +2,31 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/browser/history/page_usage_data.h"
+
#include <algorithm>
-#include "chrome/browser/history/page_usage_data.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+
+PageUsageData::~PageUsageData() {
+ delete thumbnail_;
+ delete favicon_;
+}
+
+void PageUsageData::SetThumbnail(SkBitmap* img) {
+ if (thumbnail_ && thumbnail_ != img)
+ delete thumbnail_;
+
+ thumbnail_ = img;
+ thumbnail_set_ = true;
+}
+
+void PageUsageData::SetFavIcon(SkBitmap* img) {
+ if (favicon_ && favicon_ != img)
+ delete favicon_;
+ favicon_ = img;
+ favicon_set_ = true;
+}
//static
bool PageUsageData::Predicate(const PageUsageData* lhs,
diff --git a/chrome/browser/history/page_usage_data.h b/chrome/browser/history/page_usage_data.h
index 57b0be1..9e45317 100644
--- a/chrome/browser/history/page_usage_data.h
+++ b/chrome/browser/history/page_usage_data.h
@@ -6,10 +6,10 @@
#define CHROME_BROWSER_HISTORY_PAGE_USAGE_DATA_H__
#include "base/string16.h"
-#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_types.h"
#include "googleurl/src/gurl.h"
-#include "third_party/skia/include/core/SkBitmap.h"
+
+class SkBitmap;
/////////////////////////////////////////////////////////////////////////////
//
@@ -34,10 +34,7 @@ class PageUsageData {
score_(0.0) {
}
- virtual ~PageUsageData() {
- delete thumbnail_;
- delete favicon_;
- }
+ virtual ~PageUsageData();
// Return the url ID
history::URLID GetID() const {
@@ -72,13 +69,7 @@ class PageUsageData {
thumbnail_set_ = true;
}
- void SetThumbnail(SkBitmap* img) {
- if (thumbnail_ && thumbnail_ != img)
- delete thumbnail_;
-
- thumbnail_ = img;
- thumbnail_set_ = true;
- }
+ void SetThumbnail(SkBitmap* img);
bool HasThumbnail() const {
return thumbnail_set_;
@@ -100,12 +91,7 @@ class PageUsageData {
favicon_set_ = true;
}
- void SetFavIcon(SkBitmap* img) {
- if (favicon_ && favicon_ != img)
- delete favicon_;
- favicon_ = img;
- favicon_set_ = true;
- }
+ void SetFavIcon(SkBitmap* img);
bool HasFavIcon() const {
return favicon_set_;
diff --git a/chrome/browser/history/query_parser.h b/chrome/browser/history/query_parser.h
index a29548a8..8f6c86d 100644
--- a/chrome/browser/history/query_parser.h
+++ b/chrome/browser/history/query_parser.h
@@ -8,7 +8,7 @@
#ifndef CHROME_BROWSER_HISTORY_QUERY_PARSER_H__
#define CHROME_BROWSER_HISTORY_QUERY_PARSER_H__
-#include <set>
+#include <string>
#include <vector>
#include "chrome/browser/history/snippet.h"
diff --git a/chrome/browser/history/starred_url_database.h b/chrome/browser/history/starred_url_database.h
index 7c2925c..fd11ac2 100644
--- a/chrome/browser/history/starred_url_database.h
+++ b/chrome/browser/history/starred_url_database.h
@@ -5,17 +5,16 @@
#ifndef CHROME_BROWSER_HISTORY_STARRED_URL_DATABASE_H_
#define CHROME_BROWSER_HISTORY_STARRED_URL_DATABASE_H_
-#include <map>
#include <set>
#include "app/tree_node_model.h"
#include "base/basictypes.h"
-#include "base/file_path.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/url_database.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
struct sqlite3;
+class FilePath;
class SqliteStatementCache;
namespace history {
diff --git a/chrome/browser/history/text_database.cc b/chrome/browser/history/text_database.cc
index 6554afa..5ffdc95 100644
--- a/chrome/browser/history/text_database.cc
+++ b/chrome/browser/history/text_database.cc
@@ -10,6 +10,7 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/string_util.h"
+#include "chrome/common/sqlite_compiled_statement.h"
#include "chrome/common/sqlite_utils.h"
// There are two tables in each database, one full-text search (FTS) table which
diff --git a/chrome/browser/history/text_database.h b/chrome/browser/history/text_database.h
index 62e6b6e..797e3e9 100644
--- a/chrome/browser/history/text_database.h
+++ b/chrome/browser/history/text_database.h
@@ -12,10 +12,10 @@
#include "base/file_path.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/meta_table_helper.h"
-#include "chrome/common/sqlite_compiled_statement.h"
#include "googleurl/src/gurl.h"
struct sqlite3;
+class SqliteStatementCache;
namespace history {
diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc
index 467a269..66580c3 100644
--- a/chrome/browser/history/text_database_manager.cc
+++ b/chrome/browser/history/text_database_manager.cc
@@ -11,6 +11,7 @@
#include "base/message_loop.h"
#include "base/string_util.h"
#include "chrome/browser/history/history_publisher.h"
+#include "chrome/browser/history/visit_database.h"
#include "chrome/common/mru_cache.h"
using base::Time;
diff --git a/chrome/browser/history/text_database_manager.h b/chrome/browser/history/text_database_manager.h
index 9898abe..85b9992 100644
--- a/chrome/browser/history/text_database_manager.h
+++ b/chrome/browser/history/text_database_manager.h
@@ -15,7 +15,6 @@
#include "chrome/browser/history/text_database.h"
#include "chrome/browser/history/query_parser.h"
#include "chrome/browser/history/url_database.h"
-#include "chrome/browser/history/visit_database.h"
#include "chrome/common/mru_cache.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
@@ -24,6 +23,7 @@ struct sqlite3;
namespace history {
class HistoryPublisher;
+class VisitDatabase;
// Manages a set of text databases representing different time periods. This
// will page them in and out as necessary, and will manage queries for times
diff --git a/chrome/browser/history/text_database_manager_unittest.cc b/chrome/browser/history/text_database_manager_unittest.cc
index ad7f70e..9762ec1 100644
--- a/chrome/browser/history/text_database_manager_unittest.cc
+++ b/chrome/browser/history/text_database_manager_unittest.cc
@@ -6,6 +6,7 @@
#include "base/file_util.h"
#include "base/message_loop.h"
#include "chrome/browser/history/text_database_manager.h"
+#include "chrome/browser/history/visit_database.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::Time;
diff --git a/chrome/browser/history/thumbnail_database.h b/chrome/browser/history/thumbnail_database.h
index 50ee8aa..7df5652 100644
--- a/chrome/browser/history/thumbnail_database.h
+++ b/chrome/browser/history/thumbnail_database.h
@@ -7,15 +7,15 @@
#include <vector>
-#include "base/file_path.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/url_database.h" // For DBCloseScoper.
#include "chrome/browser/meta_table_helper.h"
-#include "chrome/common/sqlite_compiled_statement.h"
-#include "third_party/skia/include/core/SkBitmap.h"
struct sqlite3;
+class FilePath;
struct ThumbnailScore;
+class SkBitmap;
+class SqliteStatementCache;
namespace base {
class Time;
}
diff --git a/chrome/browser/history/visit_tracker.cc b/chrome/browser/history/visit_tracker.cc
index 7c68bd8..7bb0011 100644
--- a/chrome/browser/history/visit_tracker.cc
+++ b/chrome/browser/history/visit_tracker.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/history/visit_tracker.h"
+#include "base/stl_util-inl.h"
+
namespace history {
// When the list gets longer than 'MaxItems', CleanupTransitionList will resize
diff --git a/chrome/browser/history/visit_tracker.h b/chrome/browser/history/visit_tracker.h
index d111187..3d07a39 100644
--- a/chrome/browser/history/visit_tracker.h
+++ b/chrome/browser/history/visit_tracker.h
@@ -5,8 +5,8 @@
#ifndef CHROME_BROWSER_HISTORY_VISIT_TRACKER_H__
#define CHROME_BROWSER_HISTORY_VISIT_TRACKER_H__
-#include <list>
#include <map>
+#include <vector>
#include "base/basictypes.h"
#include "chrome/browser/history/history_types.h"
diff --git a/chrome/browser/history/visitsegment_database.cc b/chrome/browser/history/visitsegment_database.cc
index 8d9c362..981d43c 100644
--- a/chrome/browser/history/visitsegment_database.cc
+++ b/chrome/browser/history/visitsegment_database.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/history/visitsegment_database.h"
+#include <math.h>
+
#include "base/logging.h"
#include "base/string_util.h"
#include "chrome/browser/history/page_usage_data.h"