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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 void FinishOnUIThread() { | 125 void FinishOnUIThread() { |
126 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 126 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
127 if (run_loop_->running()) | 127 if (run_loop_->running()) |
128 run_loop_->Quit(); | 128 run_loop_->Quit(); |
129 } | 129 } |
130 | 130 |
131 void StartOnFileThread() { | 131 void StartOnFileThread() { |
132 CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 132 CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
133 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = | 133 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = |
134 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); | 134 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); |
135 | 135 |
136 scoped_refptr<SandboxedUnpacker> unpacker(new SandboxedUnpacker( | 136 scoped_refptr<SandboxedUnpacker> unpacker(new SandboxedUnpacker( |
137 Manifest::INTERNAL, 0, /* no special creation flags */ | 137 Manifest::INTERNAL, 0, /* no special creation flags */ |
138 temp_dir_, file_task_runner.get(), this)); | 138 temp_dir_, file_task_runner.get(), this)); |
139 unpacker->StartWithCrx(crx_file_); | 139 unpacker->StartWithCrx(crx_file_); |
140 } | 140 } |
141 | 141 |
142 // The file being validated. | 142 // The file being validated. |
143 const CRXFileInfo& crx_file_; | 143 const CRXFileInfo& crx_file_; |
144 | 144 |
(...skipping 43 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 |