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

Side by Side Diff: components/subresource_filter/core/common/unindexed_ruleset.cc

Issue 2523663002: Remove remaining base dependencies from base/numerics (Closed)
Patch Set: fix gcc compile Created 4 years 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 unified diff | Download patch
« no previous file with comments | « chromecast/media/base/media_caps.cc ('k') | crypto/signature_verifier_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/subresource_filter/core/common/unindexed_ruleset.h" 5 #include "components/subresource_filter/core/common/unindexed_ruleset.h"
6 6
7 #include "base/logging.h"
7 #include "base/numerics/safe_conversions.h" 8 #include "base/numerics/safe_conversions.h"
8 9
9 namespace subresource_filter { 10 namespace subresource_filter {
10 11
11 // UnindexedRulesetReader ------------------------------------------------------ 12 // UnindexedRulesetReader ------------------------------------------------------
12 13
13 UnindexedRulesetReader::UnindexedRulesetReader( 14 UnindexedRulesetReader::UnindexedRulesetReader(
14 google::protobuf::io::ZeroCopyInputStream* stream) 15 google::protobuf::io::ZeroCopyInputStream* stream)
15 : coded_stream_(stream) {} 16 : coded_stream_(stream) {}
16 17
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 DCHECK(!had_error()); 62 DCHECK(!had_error());
62 DCHECK_GT(pending_chunk_.url_rules_size(), 0); 63 DCHECK_GT(pending_chunk_.url_rules_size(), 0);
63 64
64 proto::FilteringRules chunk; 65 proto::FilteringRules chunk;
65 chunk.Swap(&pending_chunk_); 66 chunk.Swap(&pending_chunk_);
66 coded_stream_.WriteVarint32(base::checked_cast<uint32_t>(chunk.ByteSize())); 67 coded_stream_.WriteVarint32(base::checked_cast<uint32_t>(chunk.ByteSize()));
67 return !had_error() && chunk.SerializeToCodedStream(&coded_stream_); 68 return !had_error() && chunk.SerializeToCodedStream(&coded_stream_);
68 } 69 }
69 70
70 } // namespace subresource_filter 71 } // namespace subresource_filter
OLDNEW
« no previous file with comments | « chromecast/media/base/media_caps.cc ('k') | crypto/signature_verifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698