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

Unified Diff: components/safe_browsing_db/v4_protocol_manager_util.h

Issue 2447443002: Log the size of each of the stores and complete DB on launch and after each (Closed)
Patch Set: shess@'s review Created 4 years, 2 months 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: components/safe_browsing_db/v4_protocol_manager_util.h
diff --git a/components/safe_browsing_db/v4_protocol_manager_util.h b/components/safe_browsing_db/v4_protocol_manager_util.h
index 403a56ff4b01c400bd723e5ab656b2cbe9045fb3..ab9987c7de8773614d2a233f85b448a25464676c 100644
--- a/components/safe_browsing_db/v4_protocol_manager_util.h
+++ b/components/safe_browsing_db/v4_protocol_manager_util.h
@@ -193,6 +193,8 @@ enum V4OperationResult {
};
// A class that provides static methods related to the Pver4 protocol.
+// TODO(vakh): Consider making this class a namespace instead.
+// TODO(vakh): Re-order the methods in alphabetical order.
class V4ProtocolManagerUtil {
public:
// Canonicalizes url as per Google Safe Browsing Specification.
@@ -264,6 +266,9 @@ class V4ProtocolManagerUtil {
static void SetClientInfoFromConfig(ClientInfo* client_info,
const V4ProtocolConfig& config);
+ // Returns the size of the file at |file_path|, or 0 if there's an error.
+ static int64_t GetFileSizeOrZero(const base::FilePath& file_path);
Nathan Parker 2016/10/24 20:33:54 Are you using this in v4? If not, why move it?
vakh (use Gerrit instead) 2016/10/24 22:04:50 I was. Then shess@ pointed out that I don't need t
+
private:
V4ProtocolManagerUtil(){};
FRIEND_TEST_ALL_PREFIXES(V4ProtocolManagerUtilTest, TestBackOffLogic);

Powered by Google App Engine
This is Rietveld 408576698