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

Unified Diff: chrome/browser/managed_mode/managed_mode_url_filter_unittest.cc

Issue 11826059: Add ManagedUserService for profile-specific managed user data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix Created 7 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
Index: chrome/browser/managed_mode/managed_mode_url_filter_unittest.cc
diff --git a/chrome/browser/managed_mode/managed_mode_url_filter_unittest.cc b/chrome/browser/managed_mode/managed_mode_url_filter_unittest.cc
index c8f7ee6b561ac4a19d12f2c1054f3f3b8ccad7f5..21df1f4709712dd68a6c8156d971427c18fec46c 100644
--- a/chrome/browser/managed_mode/managed_mode_url_filter_unittest.cc
+++ b/chrome/browser/managed_mode/managed_mode_url_filter_unittest.cc
@@ -10,34 +10,6 @@
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace {
-
-class FailClosureHelper : public base::RefCountedThreadSafe<FailClosureHelper> {
- public:
- explicit FailClosureHelper(const base::Closure& cb) : closure_runner_(cb) {}
-
- void Fail() {
- FAIL();
- }
-
- private:
- friend class base::RefCountedThreadSafe<FailClosureHelper>;
-
- virtual ~FailClosureHelper() {}
-
- base::ScopedClosureRunner closure_runner_;
-};
-
-// Returns a closure that FAILs when it is called. As soon as the closure is
-// destroyed (because the last reference to it is dropped), |continuation| is
-// called.
-base::Closure FailClosure(const base::Closure& continuation) {
- scoped_refptr<FailClosureHelper> helper = new FailClosureHelper(continuation);
- return base::Bind(&FailClosureHelper::Fail, helper);
-}
-
-} // namespace
-
class ManagedModeURLFilterTest : public ::testing::Test,
public ManagedModeURLFilter::Observer {
public:
@@ -63,7 +35,7 @@ class ManagedModeURLFilterTest : public ::testing::Test,
MessageLoop message_loop_;
base::RunLoop run_loop_;
- scoped_ptr<ManagedModeURLFilter> filter_;
+ scoped_refptr<ManagedModeURLFilter> filter_;
};
TEST_F(ManagedModeURLFilterTest, Basic) {

Powered by Google App Engine
This is Rietveld 408576698