| 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/startup_helper.h" | 5 #include "chrome/browser/extensions/startup_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 FROM_HERE, | 94 FROM_HERE, |
| 95 base::Bind(&ValidateCrxHelper::StartOnFileThread, | 95 base::Bind(&ValidateCrxHelper::StartOnFileThread, |
| 96 this)); | 96 this)); |
| 97 } | 97 } |
| 98 | 98 |
| 99 protected: | 99 protected: |
| 100 ~ValidateCrxHelper() override {} | 100 ~ValidateCrxHelper() override {} |
| 101 | 101 |
| 102 void OnUnpackSuccess(const base::FilePath& temp_dir, | 102 void OnUnpackSuccess(const base::FilePath& temp_dir, |
| 103 const base::FilePath& extension_root, | 103 const base::FilePath& extension_root, |
| 104 const base::DictionaryValue* original_manifest, | 104 std::unique_ptr<base::DictionaryValue> original_manifest, |
| 105 const Extension* extension, | 105 const Extension* extension, |
| 106 const SkBitmap& install_icon) override { | 106 const SkBitmap& install_icon) override { |
| 107 finished_ = true; | 107 finished_ = true; |
| 108 success_ = true; | 108 success_ = true; |
| 109 BrowserThread::PostTask(BrowserThread::UI, | 109 BrowserThread::PostTask(BrowserThread::UI, |
| 110 FROM_HERE, | 110 FROM_HERE, |
| 111 base::Bind(&ValidateCrxHelper::FinishOnUIThread, | 111 base::Bind(&ValidateCrxHelper::FinishOnUIThread, |
| 112 this)); | 112 this)); |
| 113 } | 113 } |
| 114 | 114 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 *error = base::UTF16ToUTF8(helper->error()); | 188 *error = base::UTF16ToUTF8(helper->error()); |
| 189 return success; | 189 return success; |
| 190 } | 190 } |
| 191 | 191 |
| 192 StartupHelper::~StartupHelper() { | 192 StartupHelper::~StartupHelper() { |
| 193 if (pack_job_.get()) | 193 if (pack_job_.get()) |
| 194 pack_job_->ClearClient(); | 194 pack_job_->ClearClient(); |
| 195 } | 195 } |
| 196 | 196 |
| 197 } // namespace extensions | 197 } // namespace extensions |
| OLD | NEW |