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

Side by Side Diff: chrome/browser/extensions/extension_service_unittest.h

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile gdi. Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "chrome/browser/extensions/extension_service.h" 14 #include "chrome/browser/extensions/extension_service.h"
15 #include "chrome/common/extensions/feature_switch.h" 15 #include "chrome/common/extensions/feature_switch.h"
16 #include "content/public/test/test_browser_thread.h" 16 #include "content/public/test/test_browser_thread_bundle.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 #if defined(OS_CHROMEOS) 19 #if defined(OS_CHROMEOS)
20 #include "chrome/browser/chromeos/login/user_manager.h" 20 #include "chrome/browser/chromeos/login/user_manager.h"
21 #include "chrome/browser/chromeos/settings/cros_settings.h" 21 #include "chrome/browser/chromeos/settings/cros_settings.h"
22 #include "chrome/browser/chromeos/settings/device_settings_service.h" 22 #include "chrome/browser/chromeos/settings/device_settings_service.h"
23 #endif 23 #endif
24 24
25 class TestingProfile; 25 class TestingProfile;
26 26
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 virtual void TearDown() OVERRIDE; 61 virtual void TearDown() OVERRIDE;
62 62
63 void set_extensions_enabled(bool enabled) { 63 void set_extensions_enabled(bool enabled) {
64 service_->set_extensions_enabled(enabled); 64 service_->set_extensions_enabled(enabled);
65 } 65 }
66 66
67 protected: 67 protected:
68 void InitializeExtensionServiceHelper(bool autoupdate_enabled, 68 void InitializeExtensionServiceHelper(bool autoupdate_enabled,
69 bool is_first_run); 69 bool is_first_run);
70 70
71 base::MessageLoop loop_; 71 content::TestBrowserThreadBundle thread_bundle_;
72 base::ShadowingAtExitManager at_exit_manager_; 72 base::ShadowingAtExitManager at_exit_manager_;
73 base::ScopedTempDir temp_dir_; 73 base::ScopedTempDir temp_dir_;
74 scoped_ptr<TestingProfile> profile_; 74 scoped_ptr<TestingProfile> profile_;
75 base::FilePath extensions_install_dir_; 75 base::FilePath extensions_install_dir_;
76 base::FilePath data_dir_; 76 base::FilePath data_dir_;
77 // Managed by extensions::ExtensionSystemFactory. 77 // Managed by extensions::ExtensionSystemFactory.
78 ExtensionService* service_; 78 ExtensionService* service_;
79 extensions::ManagementPolicy* management_policy_; 79 extensions::ManagementPolicy* management_policy_;
80 size_t expected_extensions_count_; 80 size_t expected_extensions_count_;
81 content::TestBrowserThread ui_thread_;
82 content::TestBrowserThread db_thread_;
83 content::TestBrowserThread file_thread_;
84 content::TestBrowserThread file_user_blocking_thread_;
85 content::TestBrowserThread io_thread_;
86 81
87 #if defined OS_CHROMEOS 82 #if defined OS_CHROMEOS
88 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; 83 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_;
89 chromeos::ScopedTestCrosSettings test_cros_settings_; 84 chromeos::ScopedTestCrosSettings test_cros_settings_;
90 chromeos::ScopedTestUserManager test_user_manager_; 85 chromeos::ScopedTestUserManager test_user_manager_;
91 #endif 86 #endif
92 }; 87 };
93 88
94 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ 89 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698