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

Unified Diff: net/disk_cache/blockfile/addr.h

Issue 2458773003: Clarify that BlockSizeForFileType can't be called with EXTERNAL FileType (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/addr.h
diff --git a/net/disk_cache/blockfile/addr.h b/net/disk_cache/blockfile/addr.h
index f21fbf2aa14000ccdd6f978a976ed238b4bc3099..e55499caa48e42fc9b6ebd727fd2449f6ca6f020 100644
--- a/net/disk_cache/blockfile/addr.h
+++ b/net/disk_cache/blockfile/addr.h
@@ -11,6 +11,7 @@
#include <stddef.h>
#include <stdint.h>
+#include "base/logging.h"
#include "net/base/net_export.h"
#include "net/disk_cache/blockfile/disk_format_base.h"
@@ -138,7 +139,8 @@ class NET_EXPORT_PRIVATE Addr {
return 104;
case BLOCK_EVICTED:
return 48;
- default:
+ case EXTERNAL:
+ NOTREACHED();
Zhongyi Shi 2016/10/27 23:29:43 nit: I would prefer to have the default case but w
hans 2016/10/27 23:33:35 But then you won't get any compiler warning if ano
Zhongyi Shi 2016/10/28 00:01:49 What I am proposing is case BLOCK_EVICTED: retu
hans 2016/10/28 00:57:35 Yes, every enum needs to be handled in the switch,
Zhongyi Shi 2016/10/28 02:26:49 Alright, your argument sold, I agreed that this co
return 0;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698