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

Unified Diff: base/test/mock_time_provider.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/mock_time_provider.h ('k') | base/test/test_suite.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/mock_time_provider.cc
diff --git a/base/test/mock_time_provider.cc b/base/test/mock_time_provider.cc
deleted file mode 100644
index 9e5547fcd94119e3b2978f6c2c41fe5687708cb5..0000000000000000000000000000000000000000
--- a/base/test/mock_time_provider.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/logging.h"
-#include "base/test/mock_time_provider.h"
-
-using ::testing::DefaultValue;
-
-namespace base {
-
-MockTimeProvider* MockTimeProvider::instance_ = NULL;
-
-MockTimeProvider::MockTimeProvider() {
- DCHECK(!instance_) << "Only one instance of MockTimeProvider can exist";
- DCHECK(!DefaultValue<Time>::IsSet());
- instance_ = this;
- DefaultValue<Time>::Set(Time::FromInternalValue(0));
-}
-
-MockTimeProvider::~MockTimeProvider() {
- instance_ = NULL;
- DefaultValue<Time>::Clear();
-}
-
-// static
-Time MockTimeProvider::StaticNow() {
- return instance_->Now();
-}
-
-} // namespace base
« no previous file with comments | « base/test/mock_time_provider.h ('k') | base/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698