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

Side by Side Diff: chrome/browser/visitedlink_master.h

Issue 42235: Make debug check in visitedlink_master.h more informative (Closed)
Patch Set: Created 11 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_VISITEDLINK_MASTER_H__ 5 #ifndef CHROME_BROWSER_VISITEDLINK_MASTER_H__
6 #define CHROME_BROWSER_VISITEDLINK_MASTER_H__ 6 #define CHROME_BROWSER_VISITEDLINK_MASTER_H__
7 7
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // NOTE: These methods are defined inline here, so we can share the compilation 385 // NOTE: These methods are defined inline here, so we can share the compilation
386 // of visitedlink_master.cc between the browser and the unit/perf tests. 386 // of visitedlink_master.cc between the browser and the unit/perf tests.
387 387
388 #if defined(UNIT_TEST) || defined(PERF_TEST) || !defined(NDEBUG) 388 #if defined(UNIT_TEST) || defined(PERF_TEST) || !defined(NDEBUG)
389 inline void VisitedLinkMaster::DebugValidate() { 389 inline void VisitedLinkMaster::DebugValidate() {
390 int32 used_count = 0; 390 int32 used_count = 0;
391 for (int32 i = 0; i < table_length_; i++) { 391 for (int32 i = 0; i < table_length_; i++) {
392 if (hash_table_[i]) 392 if (hash_table_[i])
393 used_count++; 393 used_count++;
394 } 394 }
395 DCHECK(used_count == used_items_); 395 DCHECK_EQ(used_count, used_items_);
396 } 396 }
397 #endif 397 #endif
398 398
399 #endif // CHROME_BROWSER_VISITEDLINK_MASTER_H__ 399 #endif // CHROME_BROWSER_VISITEDLINK_MASTER_H__
OLDNEW
« 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