summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-11 16:31:13 +0000
committerpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-11 16:31:13 +0000
commit4d2b744be713c70827adf457bc7c8a08532f38d2 (patch)
tree1c1494f88a77d4e4984576a63740d95c57c9b812 /chrome/browser
parent893442d1fe73611d5b270389bc4f079cbfcc143a (diff)
downloadchromium_src-4d2b744be713c70827adf457bc7c8a08532f38d2.zip
chromium_src-4d2b744be713c70827adf457bc7c8a08532f38d2.tar.gz
chromium_src-4d2b744be713c70827adf457bc7c8a08532f38d2.tar.bz2
make sure we match all the tests and files that linux has running. We were never building process_posix, but now the newly added unit tests use it.
Review URL: http://codereview.chromium.org/10221 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5175 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_unittest.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index cf187a2..45161d6 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -928,7 +928,11 @@ struct ChunksInfo {
void PeformUpdate(const std::wstring& initial_db,
const std::vector<ChunksInfo>& chunks,
std::vector<SBChunkDelete>* deletes) {
+// TODO(pinkerton): I don't think posix has any concept of IO counters, but
+// we can uncomment this when we implement ProcessMetrics::GetIOCounters
+#if defined(OS_WIN) || defined(OS_LINUX)
IoCounters before, after;
+#endif
std::wstring filename;
PathService::Get(base::DIR_TEMP, &filename);
@@ -950,7 +954,9 @@ void PeformUpdate(const std::wstring& initial_db,
ProcessHandle handle = Process::Current().handle();
scoped_ptr<process_util::ProcessMetrics> metric(
process_util::ProcessMetrics::CreateProcessMetrics(handle));
+#if defined(OS_WIN) || defined(OS_LINUX)
CHECK(metric->GetIOCounters(&before));
+#endif
database->UpdateStarted();
@@ -960,6 +966,7 @@ void PeformUpdate(const std::wstring& initial_db,
database->UpdateFinished(true);
+#if defined(OS_WIN) || defined(OS_LINUX)
CHECK(metric->GetIOCounters(&after));
LOG(INFO) << StringPrintf("I/O Read Bytes: %d",
@@ -972,6 +979,7 @@ void PeformUpdate(const std::wstring& initial_db,
after.WriteOperationCount - before.WriteOperationCount);
LOG(INFO) << StringPrintf("Finished in %d ms",
(Time::Now() - before_time).InMilliseconds());
+#endif
PrintStat(L"c:SB.HostSelect");
PrintStat(L"c:SB.HostSelectForBloomFilter");