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

Unified Diff: content/test/test_navigation_handle_factory.cc

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Addressed comments Created 5 years, 3 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: content/test/test_navigation_handle_factory.cc
diff --git a/content/test/test_navigation_handle_factory.cc b/content/test/test_navigation_handle_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..273525897d4ea0b59791f7f9f2b012c7384d6ae3
--- /dev/null
+++ b/content/test/test_navigation_handle_factory.cc
@@ -0,0 +1,27 @@
+// Copyright 2015 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/test/test_navigation_handle_factory.h"
+
+#include "content/test/test_navigation_handle.h"
+
+namespace content {
+
+TestNavigationHandleFactory::TestNavigationHandleFactory() {
+ NavigationHandleFactory::SetFactoryForTesting(this);
+}
+
+TestNavigationHandleFactory::~TestNavigationHandleFactory() {
+ NavigationHandleFactory::SetFactoryForTesting(nullptr);
+}
+
+scoped_ptr<NavigationHandleImpl> TestNavigationHandleFactory::CreateHandle(
+ const GURL& url,
+ bool is_main_frame,
+ NavigatorDelegate* delegate) {
+ return scoped_ptr<NavigationHandleImpl>(
+ TestNavigationHandle::Create(url, is_main_frame, delegate));
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698