| 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/webstore_installer.h" | 5 #include "chrome/browser/extensions/webstore_installer.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 const std::string& id, | 144 const std::string& id, |
| 145 content::DownloadItem* item) { | 145 content::DownloadItem* item) { |
| 146 } | 146 } |
| 147 | 147 |
| 148 WebstoreInstaller::Approval::Approval() | 148 WebstoreInstaller::Approval::Approval() |
| 149 : profile(NULL), | 149 : profile(NULL), |
| 150 use_app_installed_bubble(false), | 150 use_app_installed_bubble(false), |
| 151 skip_post_install_ui(false), | 151 skip_post_install_ui(false), |
| 152 skip_install_dialog(false), | 152 skip_install_dialog(false), |
| 153 record_oauth2_grant(false) { | 153 record_oauth2_grant(false) { |
| 154 show_dialog_callback = ExtensionInstallPrompt::GetDefaultShowDialogCallback(); |
| 154 } | 155 } |
| 155 | 156 |
| 156 scoped_ptr<WebstoreInstaller::Approval> | 157 scoped_ptr<WebstoreInstaller::Approval> |
| 157 WebstoreInstaller::Approval::CreateWithInstallPrompt(Profile* profile) { | 158 WebstoreInstaller::Approval::CreateWithInstallPrompt(Profile* profile) { |
| 158 scoped_ptr<Approval> result(new Approval()); | 159 scoped_ptr<Approval> result(new Approval()); |
| 159 result->profile = profile; | 160 result->profile = profile; |
| 160 return result.Pass(); | 161 return result.Pass(); |
| 161 } | 162 } |
| 162 | 163 |
| 163 scoped_ptr<WebstoreInstaller::Approval> | 164 scoped_ptr<WebstoreInstaller::Approval> |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 void WebstoreInstaller::ReportSuccess() { | 378 void WebstoreInstaller::ReportSuccess() { |
| 378 if (delegate_) { | 379 if (delegate_) { |
| 379 delegate_->OnExtensionInstallSuccess(id_); | 380 delegate_->OnExtensionInstallSuccess(id_); |
| 380 delegate_ = NULL; | 381 delegate_ = NULL; |
| 381 } | 382 } |
| 382 | 383 |
| 383 Release(); // Balanced in Start(). | 384 Release(); // Balanced in Start(). |
| 384 } | 385 } |
| 385 | 386 |
| 386 } // namespace extensions | 387 } // namespace extensions |
| OLD | NEW |