OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "base/ref_counted.h" | 5 #include "base/ref_counted.h" |
6 #include "chrome/browser/browser.h" | 6 #include "chrome/browser/browser.h" |
7 #include "chrome/browser/browser_list.h" | 7 #include "chrome/browser/browser_list.h" |
8 #include "chrome/browser/renderer_host/render_view_host.h" | 8 #include "chrome/browser/renderer_host/render_view_host.h" |
9 #include "chrome/browser/extensions/extension_shelf.h" | 9 #include "chrome/browser/extensions/extension_shelf.h" |
10 #include "chrome/browser/extensions/extension_host.h" | 10 #include "chrome/browser/extensions/extension_host.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 path = path.AppendASCII("extensions").AppendASCII("good.crx"); | 156 path = path.AppendASCII("extensions").AppendASCII("good.crx"); |
157 ASSERT_TRUE(file_util::PathExists(path)); // sanity check | 157 ASSERT_TRUE(file_util::PathExists(path)); // sanity check |
158 | 158 |
159 // Wait for the extension to load and grab a pointer to it. | 159 // Wait for the extension to load and grab a pointer to it. |
160 TestExtensionLoader loader(browser()->profile()); | 160 TestExtensionLoader loader(browser()->profile()); |
161 Extension* extension = loader.Install(kGoodCrxId, path); | 161 Extension* extension = loader.Install(kGoodCrxId, path); |
162 ASSERT_TRUE(extension); | 162 ASSERT_TRUE(extension); |
163 | 163 |
164 // TODO(mpcomplete): wait for uninstall to complete? | 164 // TODO(mpcomplete): wait for uninstall to complete? |
165 browser()->profile()->GetExtensionsService()->UninstallExtension(kGoodCrxId); | 165 browser()->profile()->GetExtensionsService()->UninstallExtension(kGoodCrxId); |
166 | |
167 // Close our incognito window. | |
168 Browser* otr_browser = BrowserList::FindBrowserWithType( | |
169 browser()->profile()->GetOffTheRecordProfile(), | |
170 Browser::TYPE_NORMAL); | |
171 if (otr_browser) | |
172 otr_browser->CloseAllTabs(); | |
173 } | 166 } |
OLD | NEW |