summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-22 21:36:50 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-22 21:36:50 +0000
commite13ad79b6359b68fbefcd589806cf59106cc2ca7 (patch)
tree8861180be5e29811786e198cbde4b246a3806408 /chrome/common
parentf6798320c6e4c14b7bb14b15fd7f1587e07d1e51 (diff)
downloadchromium_src-e13ad79b6359b68fbefcd589806cf59106cc2ca7.zip
chromium_src-e13ad79b6359b68fbefcd589806cf59106cc2ca7.tar.gz
chromium_src-e13ad79b6359b68fbefcd589806cf59106cc2ca7.tar.bz2
Continual header pruning
BUG=none TEST=none Review URL: http://codereview.chromium.org/3029019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/visitedlink_common.cc5
-rw-r--r--chrome/common/visitedlink_common.h9
2 files changed, 8 insertions, 6 deletions
diff --git a/chrome/common/visitedlink_common.cc b/chrome/common/visitedlink_common.cc
index 2782311..899e7a6 100644
--- a/chrome/common/visitedlink_common.cc
+++ b/chrome/common/visitedlink_common.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/md5.h"
+#include "googleurl/src/gurl.h"
const VisitedLinkCommon::Fingerprint VisitedLinkCommon::null_fingerprint_ = 0;
const VisitedLinkCommon::Hash VisitedLinkCommon::null_hash_ = -1;
@@ -29,6 +30,10 @@ bool VisitedLinkCommon::IsVisited(const char* canonical_url,
return IsVisited(ComputeURLFingerprint(canonical_url, url_len));
}
+bool VisitedLinkCommon::IsVisited(const GURL& url) const {
+ return IsVisited(url.spec().data(), url.spec().size());
+}
+
bool VisitedLinkCommon::IsVisited(Fingerprint fingerprint) const {
// Go through the table until we find the item or an empty spot (meaning it
// wasn't found). This loop will terminate as long as the table isn't full,
diff --git a/chrome/common/visitedlink_common.h b/chrome/common/visitedlink_common.h
index 0e79c04..546bd4f 100644
--- a/chrome/common/visitedlink_common.h
+++ b/chrome/common/visitedlink_common.h
@@ -5,12 +5,11 @@
#ifndef CHROME_COMMON_VISITEDLINK_COMMON_H__
#define CHROME_COMMON_VISITEDLINK_COMMON_H__
-#include <string>
#include <vector>
#include "base/basictypes.h"
-#include "base/logging.h"
-#include "googleurl/src/gurl.h"
+
+class GURL;
// number of bytes in the salt
#define LINK_SALT_LENGTH 8
@@ -67,9 +66,7 @@ class VisitedLinkCommon {
// computed if you call one with the string argument. Returns true if found.
// Does not modify the hastable.
bool IsVisited(const char* canonical_url, size_t url_len) const;
- bool IsVisited(const GURL& url) const {
- return IsVisited(url.spec().data(), url.spec().size());
- }
+ bool IsVisited(const GURL& url) const;
bool IsVisited(Fingerprint fingerprint) const;
#ifdef UNIT_TEST