summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/safe_browsing_service.h
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-08 21:43:16 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-08 21:43:16 +0000
commit7b1e3710535c1bc6945ad170f667e0a1e9a88ef9 (patch)
tree2bd669956a242ac48e30093aeacf2d4a57f612da /chrome/browser/safe_browsing/safe_browsing_service.h
parent16e70aeca7951680226d7ad461d5c21dadccc728 (diff)
downloadchromium_src-7b1e3710535c1bc6945ad170f667e0a1e9a88ef9.zip
chromium_src-7b1e3710535c1bc6945ad170f667e0a1e9a88ef9.tar.gz
chromium_src-7b1e3710535c1bc6945ad170f667e0a1e9a88ef9.tar.bz2
Refactor chunk ownership in SafeBrowsing code.
This attempts to clean up ownership so that it's more clear who creates and deletes the chunk data between parsing and storage in the database. SBChunkList replaces std::deque<SBChunk>, mostly to add correct cleanup in the destructor rather than requiring FreeChunks() to be called manually. Additionally remove deletion of chunk info from the database layer, now it processes const data. Additionally remove the need for SafeBrowsingDatabase to have a chunk-inserted callback by having the caller handle it directly. BUG=none TEST=none Review URL: http://codereview.chromium.org/668123 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40942 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_service.h')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index 5fb31a7..873dcb3 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -116,7 +116,7 @@ class SafeBrowsingService
bool can_cache);
// Called on the IO thread.
- void HandleChunk(const std::string& list, std::deque<SBChunk>* chunks);
+ void HandleChunk(const std::string& list, SBChunkList* chunks);
void HandleChunkDelete(std::vector<SBChunkDelete>* chunk_deletes);
// Update management. Called on the IO thread.
@@ -213,9 +213,6 @@ class SafeBrowsingService
void OnGetAllChunksFromDatabase(const std::vector<SBListChunkRanges>& lists,
bool database_error);
- // Called on the db thread when a chunk insertion is complete.
- void ChunkInserted();
-
// Called on the IO thread after the database reports that it added a chunk.
void OnChunkInserted();
@@ -227,7 +224,7 @@ class SafeBrowsingService
// Called on the database thread to add/remove chunks and host keys.
// Callee will free the data when it's done.
void HandleChunkForDatabase(const std::string& list,
- std::deque<SBChunk>* chunks);
+ SBChunkList* chunks);
void DeleteChunks(std::vector<SBChunkDelete>* chunk_deletes);