Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3139)

Unified Diff: chrome/browser/safe_browsing/protocol_parser.cc

Issue 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Remove '// namespace safe_browsing' for a small fwd decl block. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/protocol_parser.cc
diff --git a/chrome/browser/safe_browsing/protocol_parser.cc b/chrome/browser/safe_browsing/protocol_parser.cc
index 135e76f661cec927852e836b4971c9b07906ca2d..1ba1e339d85651509e13a30cf26ab26968e8cdf1 100644
--- a/chrome/browser/safe_browsing/protocol_parser.cc
+++ b/chrome/browser/safe_browsing/protocol_parser.cc
@@ -19,6 +19,8 @@
#include "chrome/browser/safe_browsing/protocol_parser.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
+namespace safe_browsing {
+
namespace {
// Helper class for scanning a buffer.
@@ -131,9 +133,10 @@ class BufferReader {
DISALLOW_COPY_AND_ASSIGN(BufferReader);
};
-bool ParseGetHashMetadata(size_t hash_count,
- BufferReader* reader,
- std::vector<SBFullHashResult>* full_hashes) {
+bool ParseGetHashMetadata(
+ size_t hash_count,
+ BufferReader* reader,
+ std::vector<SBFullHashResult>* full_hashes) {
for (size_t i = 0; i < hash_count; ++i) {
base::StringPiece line;
if (!reader->GetLine(&line))
@@ -157,8 +160,6 @@ bool ParseGetHashMetadata(size_t hash_count,
} // namespace
-namespace safe_browsing {
-
// BODY = CACHELIFETIME LF HASHENTRY* EOF
// CACHELIFETIME = DIGIT+
// HASHENTRY = LISTNAME ":" HASHSIZE ":" NUMRESPONSES [":m"] LF
@@ -199,7 +200,7 @@ bool ParseGetHash(const char* chunk_data,
return false;
SBFullHashResult full_hash;
- full_hash.list_id = safe_browsing::GetListId(cmd_parts[0]);
+ full_hash.list_id = GetListId(cmd_parts[0]);
size_t hash_len;
if (!base::StringToSizeT(cmd_parts[1], &hash_len))
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager_unittest.cc ('k') | chrome/browser/safe_browsing/protocol_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698