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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc

Issue 322893002: Cleanup: Make ExtensionService::OnExtensionInstalled take a bitmask instead of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more win compile fixes Created 6 years, 6 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 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 base::FilePath crx_path = path; 85 base::FilePath crx_path = path;
86 DCHECK(crx_path.Extension() == FILE_PATH_LITERAL(".crx")); 86 DCHECK(crx_path.Extension() == FILE_PATH_LITERAL(".crx"));
87 if (crx_path.empty()) 87 if (crx_path.empty())
88 return NULL; 88 return NULL;
89 89
90 scoped_refptr<extensions::CrxInstaller> installer( 90 scoped_refptr<extensions::CrxInstaller> installer(
91 extensions::CrxInstaller::Create(service, install_ui.Pass())); 91 extensions::CrxInstaller::Create(service, install_ui.Pass()));
92 installer->set_expected_id(std::string()); 92 installer->set_expected_id(std::string());
93 installer->set_is_gallery_install(false); 93 installer->set_is_gallery_install(false);
94 installer->set_install_source(extensions::Manifest::INTERNAL); 94 installer->set_install_source(extensions::Manifest::INTERNAL);
95 installer->set_install_wait_for_idle(false); 95 installer->set_install_immediately(true);
96 installer->set_off_store_install_allow_reason( 96 installer->set_off_store_install_allow_reason(
97 extensions::CrxInstaller::OffStoreInstallAllowedInTest); 97 extensions::CrxInstaller::OffStoreInstallAllowedInTest);
98 98
99 observer_->Watch( 99 observer_->Watch(
100 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 100 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
101 content::Source<extensions::CrxInstaller>(installer.get())); 101 content::Source<extensions::CrxInstaller>(installer.get()));
102 102
103 installer->InstallCrx(crx_path); 103 installer->InstallCrx(crx_path);
104 104
105 observer_->Wait(); 105 observer_->Wait();
(...skipping 17 matching lines...) Expand all
123 iter != errors->end(); ++iter) 123 iter != errors->end(); ++iter)
124 VLOG(1) << *iter; 124 VLOG(1) << *iter;
125 125
126 return NULL; 126 return NULL;
127 } 127 }
128 128
129 if (!observer_->WaitForExtensionViewsToLoad()) 129 if (!observer_->WaitForExtensionViewsToLoad())
130 return NULL; 130 return NULL;
131 return service->GetExtensionById(last_loaded_extension_id(), false); 131 return service->GetExtensionById(last_loaded_extension_id(), false);
132 } 132 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/base_panel_browser_test.cc ('k') | chrome/browser/ui/webui/extensions/install_extension_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698