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

Unified Diff: chrome/browser/extensions/api/dns/mock_host_resolver_creator.h

Issue 394103004: Move DnsApiTest.DnsResolveIPLiteral and DnsApiTest.DnsResolveHostname to app_shell_browsertests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: correcter gyp Created 6 years, 5 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/extensions/api/dns/mock_host_resolver_creator.h
diff --git a/chrome/browser/extensions/api/dns/mock_host_resolver_creator.h b/chrome/browser/extensions/api/dns/mock_host_resolver_creator.h
deleted file mode 100644
index bf94ccb28f3264078393f12a431c7929e5e7ea24..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/dns/mock_host_resolver_creator.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef CHROME_BROWSER_EXTENSIONS_API_DNS_MOCK_HOST_RESOLVER_CREATOR_H_
-#define CHROME_BROWSER_EXTENSIONS_API_DNS_MOCK_HOST_RESOLVER_CREATOR_H_
-
-#include <string>
-
-#include "base/memory/ref_counted.h"
-#include "base/synchronization/waitable_event.h"
-
-namespace net {
-class MockHostResolver;
-}
-
-namespace extensions {
-
-// Used only for testing. Creates a MockHostResolver, respecting threading
-// constraints.
-class MockHostResolverCreator
- : public base::RefCountedThreadSafe<MockHostResolverCreator> {
- public:
- static const std::string kHostname;
- static const std::string kAddress;
-
- MockHostResolverCreator();
-
- net::MockHostResolver* CreateMockHostResolver();
- void DeleteMockHostResolver();
-
- private:
- friend class base::RefCountedThreadSafe<MockHostResolverCreator>;
- virtual ~MockHostResolverCreator();
-
- void CreateMockHostResolverOnIOThread();
- void DeleteMockHostResolverOnIOThread();
-
- base::WaitableEvent resolver_event_;
-
- // The MockHostResolver asserts that it's used on the same thread on which
- // it's created, which is actually a stronger rule than its real counterpart.
- // But that's fine; it's good practice.
- //
- // Plain pointer because we have to manage lifetime manually.
- net::MockHostResolver* mock_host_resolver_;
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_API_DNS_MOCK_HOST_RESOLVER_CREATOR_H_
« no previous file with comments | « chrome/browser/extensions/api/dns/dns_apitest.cc ('k') | chrome/browser/extensions/api/dns/mock_host_resolver_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698