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

Side by Side Diff: chrome/browser/safe_browsing/prefix_set.cc

Issue 313073002: Clean-up coding style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase the branch Created 6 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/safe_browsing/prefix_set.h" 5 #include "chrome/browser/safe_browsing/prefix_set.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <math.h>
9 8
10 #include "base/file_util.h" 9 #include "base/file_util.h"
11 #include "base/files/scoped_file.h" 10 #include "base/files/scoped_file.h"
12 #include "base/logging.h" 11 #include "base/logging.h"
13 #include "base/md5.h" 12 #include "base/md5.h"
14 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
15 #include "base/metrics/sparse_histogram.h" 14 #include "base/metrics/sparse_histogram.h"
16 15
17 namespace { 16 namespace {
18 17
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 } 482 }
484 buffer_.push_back(prefix); 483 buffer_.push_back(prefix);
485 484
486 // Flush buffer when a run can be constructed. +1 for the index item, and +1 485 // Flush buffer when a run can be constructed. +1 for the index item, and +1
487 // to leave at least one item in the buffer for dropping duplicates. 486 // to leave at least one item in the buffer for dropping duplicates.
488 if (buffer_.size() > PrefixSet::kMaxRun + 2) 487 if (buffer_.size() > PrefixSet::kMaxRun + 2)
489 EmitRun(); 488 EmitRun();
490 } 489 }
491 490
492 } // namespace safe_browsing 491 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/prefix_set.h ('k') | chrome/browser/safe_browsing/prefix_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698