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

Unified Diff: content/public/test/content_browser_sanity_checker.cc

Issue 1137083005: Move ContentBrowserSanityChecker and WebContentsObserverSanityChecker from content/public/test to c… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « content/public/test/content_browser_sanity_checker.h ('k') | content/public/test/test_renderer_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/content_browser_sanity_checker.cc
diff --git a/content/public/test/content_browser_sanity_checker.cc b/content/public/test/content_browser_sanity_checker.cc
deleted file mode 100644
index a9e62f165cc8cdf036e03452a422fcd3a61ac5fa..0000000000000000000000000000000000000000
--- a/content/public/test/content_browser_sanity_checker.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2014 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 "content/public/test/content_browser_sanity_checker.h"
-
-#include "base/bind.h"
-#include "content/browser/web_contents/web_contents_impl.h"
-#include "content/public/test/web_contents_observer_sanity_checker.h"
-
-namespace content {
-
-namespace {
-bool g_sanity_checks_already_enabled = false;
-}
-
-ContentBrowserSanityChecker::ContentBrowserSanityChecker() {
- CHECK(!g_sanity_checks_already_enabled)
- << "Tried to enable ContentBrowserSanityChecker, but it's already been "
- << "enabled.";
- g_sanity_checks_already_enabled = true;
-
- creation_hook_ =
- base::Bind(&ContentBrowserSanityChecker::OnWebContentsCreated,
- base::Unretained(this));
- WebContentsImpl::FriendZone::AddCreatedCallbackForTesting(creation_hook_);
-}
-
-ContentBrowserSanityChecker::~ContentBrowserSanityChecker() {
- WebContentsImpl::FriendZone::RemoveCreatedCallbackForTesting(creation_hook_);
- g_sanity_checks_already_enabled = false;
-}
-
-void ContentBrowserSanityChecker::OnWebContentsCreated(
- WebContents* web_contents) {
- WebContentsObserverSanityChecker::Enable(web_contents);
-}
-
-} // namespace content
« no previous file with comments | « content/public/test/content_browser_sanity_checker.h ('k') | content/public/test/test_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698