| OLD | NEW |
| 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 #include "chrome/browser/extensions/bundle_installer.h" | 5 #include "chrome/browser/extensions/bundle_installer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 149 } |
| 150 | 150 |
| 151 // Start each WebstoreInstaller. | 151 // Start each WebstoreInstaller. |
| 152 for (ItemMap::iterator i = items_.begin(); i != items_.end(); ++i) { | 152 for (ItemMap::iterator i = items_.begin(); i != items_.end(); ++i) { |
| 153 if (i->second.state != Item::STATE_PENDING) | 153 if (i->second.state != Item::STATE_PENDING) |
| 154 continue; | 154 continue; |
| 155 | 155 |
| 156 // Since we've already confirmed the permissions, create an approval that | 156 // Since we've already confirmed the permissions, create an approval that |
| 157 // lets CrxInstaller bypass the prompt. | 157 // lets CrxInstaller bypass the prompt. |
| 158 scoped_ptr<WebstoreInstaller::Approval> approval( | 158 scoped_ptr<WebstoreInstaller::Approval> approval( |
| 159 new WebstoreInstaller::Approval); | 159 WebstoreInstaller::Approval::CreateWithNoInstallPrompt( |
| 160 approval->extension_id = i->first; | 160 profile_, |
| 161 approval->profile = profile_; | 161 i->first, |
| 162 approval->parsed_manifest.reset(parsed_manifests_[i->first]->DeepCopy()); | 162 scoped_ptr<base::DictionaryValue>( |
| 163 parsed_manifests_[i->first]->DeepCopy()))); |
| 163 approval->use_app_installed_bubble = false; | 164 approval->use_app_installed_bubble = false; |
| 164 approval->skip_post_install_ui = true; | 165 approval->skip_post_install_ui = true; |
| 165 | 166 |
| 166 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( | 167 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( |
| 167 profile_, | 168 profile_, |
| 168 this, | 169 this, |
| 169 controller, | 170 controller, |
| 170 i->first, | 171 i->first, |
| 171 approval.Pass(), | 172 approval.Pass(), |
| 172 WebstoreInstaller::FLAG_NONE); | 173 WebstoreInstaller::FLAG_NONE); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 void BundleInstaller::OnBrowserAdded(const Browser* browser) {} | 335 void BundleInstaller::OnBrowserAdded(const Browser* browser) {} |
| 335 | 336 |
| 336 void BundleInstaller::OnBrowserRemoved(const Browser* browser) { | 337 void BundleInstaller::OnBrowserRemoved(const Browser* browser) { |
| 337 if (browser_ == browser) | 338 if (browser_ == browser) |
| 338 browser_ = NULL; | 339 browser_ = NULL; |
| 339 } | 340 } |
| 340 | 341 |
| 341 void BundleInstaller::OnBrowserSetLastActive(const Browser* browser) {} | 342 void BundleInstaller::OnBrowserSetLastActive(const Browser* browser) {} |
| 342 | 343 |
| 343 } // namespace extensions | 344 } // namespace extensions |
| OLD | NEW |