summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 21:32:04 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 21:32:04 +0000
commit93aa89c7533db379bb6bab05be9f5e33af233487 (patch)
tree916b96b14f22fc7bb7dbc37be74addeb60386a17 /chrome/browser/safe_browsing
parent2d4dc50cd69de95bd3a556262bf957fb8bb84167 (diff)
downloadchromium_src-93aa89c7533db379bb6bab05be9f5e33af233487.zip
chromium_src-93aa89c7533db379bb6bab05be9f5e33af233487.tar.gz
chromium_src-93aa89c7533db379bb6bab05be9f5e33af233487.tar.bz2
FBTF: Even more deinlining.
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3879002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63261 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc7
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.h7
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_util.cc25
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_util.h16
4 files changed, 43 insertions, 12 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 781d761..6f8619c 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -50,6 +50,13 @@ static Profile* GetDefaultProfile() {
return profile_manager->GetDefaultProfile(user_data_dir);
}
+struct SafeBrowsingService::WhiteListedEntry {
+ int render_process_host_id;
+ int render_view_id;
+ std::string domain;
+ UrlCheckResult result;
+};
+
SafeBrowsingService::SafeBrowsingService()
: database_(NULL),
protocol_manager_(NULL),
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index f2608d7..050437a 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -171,12 +171,7 @@ class SafeBrowsingService
typedef base::hash_map<SBPrefix, GetHashRequestors> GetHashRequests;
// Used for whitelisting a render view when the user ignores our warning.
- struct WhiteListedEntry {
- int render_process_host_id;
- int render_view_id;
- std::string domain;
- UrlCheckResult result;
- };
+ struct WhiteListedEntry;
// Clients that we've queued up for checking later once the database is ready.
struct QueuedCheck {
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.cc b/chrome/browser/safe_browsing/safe_browsing_util.cc
index d81260f..0f99bf2 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_util.cc
@@ -27,9 +27,24 @@ static const char kContinueUrlFormat[] =
static const char kReportParams[] = "?tpl=%s&continue=%s&url=%s";
+// SBChunk ---------------------------------------------------------------------
+
+SBChunk::SBChunk()
+ : chunk_number(0),
+ list_id(0),
+ is_add(false) {
+}
+
+SBChunk::~SBChunk() {}
// SBChunkList -----------------------------------------------------------------
+SBChunkList::SBChunkList() {}
+
+SBChunkList::~SBChunkList() {
+ clear();
+}
+
void SBChunkList::clear() {
for (std::vector<SBChunk>::iterator citer = chunks_.begin();
citer != chunks_.end(); ++citer) {
@@ -44,6 +59,16 @@ void SBChunkList::clear() {
chunks_.clear();
}
+// SBListChunkRanges -----------------------------------------------------------
+
+SBListChunkRanges::SBListChunkRanges(const std::string& n) : name(n) {}
+
+// SBChunkDelete ---------------------------------------------------------------
+
+SBChunkDelete::SBChunkDelete() : is_sub_del(false) {}
+
+SBChunkDelete::~SBChunkDelete() {}
+
// SBEntry ---------------------------------------------------------------------
// static
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.h b/chrome/browser/safe_browsing/safe_browsing_util.h
index b382608e..f147fe4 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.h
+++ b/chrome/browser/safe_browsing/safe_browsing_util.h
@@ -54,6 +54,9 @@ struct SBChunkHost {
// Container for an add/sub chunk.
struct SBChunk {
+ SBChunk();
+ ~SBChunk();
+
int chunk_number;
int list_id;
bool is_add;
@@ -69,10 +72,8 @@ struct SBChunk {
// dissappear.
class SBChunkList {
public:
- SBChunkList() {}
- ~SBChunkList() {
- clear();
- }
+ SBChunkList();
+ ~SBChunkList();
// Implement that subset of the |std::deque<>| interface which
// callers expect.
@@ -113,15 +114,18 @@ struct SBFullHashResult {
// Contains information about a list in the database.
struct SBListChunkRanges {
+ explicit SBListChunkRanges(const std::string& n);
+
std::string name; // The list name.
std::string adds; // The ranges for add chunks.
std::string subs; // The ranges for sub chunks.
-
- explicit SBListChunkRanges(const std::string& n) : name(n) { }
};
// Container for deleting chunks from the database.
struct SBChunkDelete {
+ SBChunkDelete();
+ ~SBChunkDelete();
+
std::string list_name;
bool is_sub_del;
std::vector<ChunkRange> chunk_del;