summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/safe_browsing_util.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-01 21:09:54 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-01 21:09:54 +0000
commit961354ef6fe1260d978389cdcc107ad468908ba6 (patch)
tree1804c273a765e62b3ff225969f58d11b8b4235bb /chrome/browser/safe_browsing/safe_browsing_util.h
parent235f0e34406ee87a0daaeeff2ff420e39ec03753 (diff)
downloadchromium_src-961354ef6fe1260d978389cdcc107ad468908ba6.zip
chromium_src-961354ef6fe1260d978389cdcc107ad468908ba6.tar.gz
chromium_src-961354ef6fe1260d978389cdcc107ad468908ba6.tar.bz2
Clean up Safe Browsing code a little:
* Update copyrights. * Remove unnecessary headers. * Remove useless functions. * Make declaration and definition order match (in at least the _database_bloom.* files). * Eliminate database_perftest.cc, since it seems to have been disabled entirely since before the public launch, and looks like it's perhaps irrelevant to the current code design. BUG=none TEST=none Review URL: http://codereview.chromium.org/457019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_util.h')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_util.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.h b/chrome/browser/safe_browsing/safe_browsing_util.h
index 44c94c4..8ef145f 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.h
+++ b/chrome/browser/safe_browsing/safe_browsing_util.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -7,8 +7,6 @@
#ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_
#define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_
-#include <string.h>
-
#include <deque>
#include <string>
#include <vector>
@@ -18,33 +16,29 @@
class GURL;
-// #define SB_LOGGING_ENABLED
#ifdef SB_LOGGING_ENABLED
#define SB_DLOG(severity) DLOG_IF(INFO, 1)
#else
#define SB_DLOG(severity) DLOG_IF(INFO, 0)
#endif
-// forward declaration
class SBEntry;
-// Widely used typedefs -------------------------------------------------------
+// A truncated hash's type.
+typedef int SBPrefix;
// Container for holding a chunk URL and the MAC of the contents of the URL.
-typedef struct {
+struct ChunkUrl {
std::string url;
std::string mac;
std::string list_name;
-} ChunkUrl;
-
-// A truncated hash's type.
-typedef int SBPrefix;
+};
// A full hash.
-typedef union {
+union SBFullHash {
char full_hash[32];
SBPrefix prefix;
-} SBFullHash;
+};
inline bool operator==(const SBFullHash& rhash, const SBFullHash& lhash) {
return memcmp(rhash.full_hash, lhash.full_hash, sizeof(SBFullHash)) == 0;