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

Side by Side Diff: extensions/browser/extensions_test_browser_context.cc

Issue 355223002: Add ExtensionsTestBrowserContext class for test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "extensions/browser/extensions_test_browser_context.h"
6
7 #include "components/keyed_service/content/browser_context_dependency_manager.h"
8 #include "extensions/browser/extensions_browser_client.h"
9 #include "extensions/browser/test_extensions_browser_client.h"
10
11 namespace extensions {
12
13 ExtensionsTestBrowserContext::ExtensionsTestBrowserContext() {
14 BrowserContextDependencyManager::GetInstance()
15 ->CreateBrowserContextServicesForTest(this);
16 ExtensionsBrowserClient::Set(new TestExtensionsBrowserClient(this));
Yoyo Zhou 2014/07/18 01:47:13 It looks like this is leaked. Can you mean the Tes
limasdf 2014/07/18 02:22:25 This is necessary because from the ChromeExtension
Yoyo Zhou 2014/07/18 02:38:45 Sorry, I meant to write "make" instead of "mean" a
limasdf 2014/07/18 06:48:12 Done. Yes exactly, there was a leak. Fixed.
17 }
18
19 ExtensionsTestBrowserContext::~ExtensionsTestBrowserContext() {
20 BrowserContextDependencyManager::GetInstance()
21 ->DestroyBrowserContextServices(this);
22 ExtensionsBrowserClient::Set(NULL);
23 }
24
25 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extensions_test_browser_context.h ('k') | extensions/browser/image_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698