OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/webui/extensions/extension_settings_browsertest.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_settings_browsertest.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 class MockAutoConfirmExtensionInstallPrompt : public ExtensionInstallPrompt { | 59 class MockAutoConfirmExtensionInstallPrompt : public ExtensionInstallPrompt { |
60 public: | 60 public: |
61 explicit MockAutoConfirmExtensionInstallPrompt( | 61 explicit MockAutoConfirmExtensionInstallPrompt( |
62 content::WebContents* web_contents) | 62 content::WebContents* web_contents) |
63 : ExtensionInstallPrompt(web_contents) {} | 63 : ExtensionInstallPrompt(web_contents) {} |
64 | 64 |
65 // Proceed without confirmation prompt. | 65 // Proceed without confirmation prompt. |
66 virtual void ConfirmInstall( | 66 virtual void ConfirmInstall( |
67 Delegate* delegate, | 67 Delegate* delegate, |
68 const Extension* extension, | 68 const Extension* extension, |
69 const ShowDialogCallback& show_dialog_callback) OVERRIDE { | 69 const ShowDialogCallback& show_dialog_callback) override { |
70 delegate->InstallUIProceed(); | 70 delegate->InstallUIProceed(); |
71 } | 71 } |
72 }; | 72 }; |
73 | 73 |
74 const Extension* ExtensionSettingsUIBrowserTest::InstallExtension( | 74 const Extension* ExtensionSettingsUIBrowserTest::InstallExtension( |
75 const base::FilePath& path) { | 75 const base::FilePath& path) { |
76 Profile* profile = this->GetProfile(); | 76 Profile* profile = this->GetProfile(); |
77 ExtensionService* service = | 77 ExtensionService* service = |
78 extensions::ExtensionSystem::Get(profile)->extension_service(); | 78 extensions::ExtensionSystem::Get(profile)->extension_service(); |
79 service->set_show_extensions_prompts(false); | 79 service->set_show_extensions_prompts(false); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 iter != errors->end(); ++iter) | 124 iter != errors->end(); ++iter) |
125 VLOG(1) << *iter; | 125 VLOG(1) << *iter; |
126 | 126 |
127 return NULL; | 127 return NULL; |
128 } | 128 } |
129 | 129 |
130 if (!observer_->WaitForExtensionViewsToLoad()) | 130 if (!observer_->WaitForExtensionViewsToLoad()) |
131 return NULL; | 131 return NULL; |
132 return service->GetExtensionById(last_loaded_extension_id(), false); | 132 return service->GetExtensionById(last_loaded_extension_id(), false); |
133 } | 133 } |
OLD | NEW |