| 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_install_helper.h" | 5 #include "chrome/browser/extensions/webstore_install_helper.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 | 187 |
| 188 BrowserThread::PostTask( | 188 BrowserThread::PostTask( |
| 189 BrowserThread::UI, | 189 BrowserThread::UI, |
| 190 FROM_HERE, | 190 FROM_HERE, |
| 191 base::Bind(&WebstoreInstallHelper::ReportResultFromUIThread, this)); | 191 base::Bind(&WebstoreInstallHelper::ReportResultFromUIThread, this)); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void WebstoreInstallHelper::ReportResultFromUIThread() { | 194 void WebstoreInstallHelper::ReportResultFromUIThread() { |
| 195 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 195 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 196 if (error_.empty() && parsed_manifest_.get()) | 196 if (error_.empty() && parsed_manifest_) |
| 197 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release()); | 197 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release()); |
| 198 else | 198 else |
| 199 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_); | 199 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_); |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace extensions | 202 } // namespace extensions |
| OLD | NEW |