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

Side by Side Diff: net/disk_cache/backend_unittest.cc

Issue 140893013: Clean up dependencies for disk_cache histogram_macros.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix fat finger Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/entry_impl.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 (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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/port.h" 8 #include "base/port.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 17 matching lines...) Expand all
28 #include "net/disk_cache/simple/simple_entry_format.h" 28 #include "net/disk_cache/simple/simple_entry_format.h"
29 #include "net/disk_cache/simple/simple_test_util.h" 29 #include "net/disk_cache/simple/simple_test_util.h"
30 #include "net/disk_cache/simple/simple_util.h" 30 #include "net/disk_cache/simple/simple_util.h"
31 #include "net/disk_cache/tracing_cache_backend.h" 31 #include "net/disk_cache/tracing_cache_backend.h"
32 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
33 33
34 #if defined(OS_WIN) 34 #if defined(OS_WIN)
35 #include "base/win/scoped_handle.h" 35 #include "base/win/scoped_handle.h"
36 #endif 36 #endif
37 37
38 // Provide a BackendImpl object to macros from histogram_macros.h.
39 #define CACHE_UMA_BACKEND_IMPL_OBJ backend_
40
38 using base::Time; 41 using base::Time;
39 42
40 namespace { 43 namespace {
41 44
42 const char kExistingEntryKey[] = "existing entry key"; 45 const char kExistingEntryKey[] = "existing entry key";
43 46
44 scoped_ptr<disk_cache::BackendImpl> CreateExistingEntryCache( 47 scoped_ptr<disk_cache::BackendImpl> CreateExistingEntryCache(
45 const base::Thread& cache_thread, 48 const base::Thread& cache_thread,
46 base::FilePath& cache_path) { 49 base::FilePath& cache_path) {
47 net::TestCompletionCallback cb; 50 net::TestCompletionCallback cb;
(...skipping 3437 matching lines...) Expand 10 before | Expand all | Expand 10 after
3485 void* iter = NULL; 3488 void* iter = NULL;
3486 size_t count = 0; 3489 size_t count = 0;
3487 ASSERT_TRUE(EnumerateAndMatchKeys(-1, &iter, &keys_to_match, &count)); 3490 ASSERT_TRUE(EnumerateAndMatchKeys(-1, &iter, &keys_to_match, &count));
3488 cache_->EndEnumeration(&iter); 3491 cache_->EndEnumeration(&iter);
3489 3492
3490 EXPECT_EQ(key_pool.size(), count); 3493 EXPECT_EQ(key_pool.size(), count);
3491 EXPECT_TRUE(keys_to_match.empty()); 3494 EXPECT_TRUE(keys_to_match.empty());
3492 } 3495 }
3493 3496
3494 #endif // defined(OS_POSIX) 3497 #endif // defined(OS_POSIX)
OLDNEW
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698