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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 136 CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
137 scoped_refptr<base::MessageLoopProxy> file_thread_proxy = | 137 scoped_refptr<base::MessageLoopProxy> file_thread_proxy = |
138 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); | 138 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); |
139 | 139 |
140 scoped_refptr<SandboxedUnpacker> unpacker( | 140 scoped_refptr<SandboxedUnpacker> unpacker( |
141 new SandboxedUnpacker(crx_file_, | 141 new SandboxedUnpacker(crx_file_, |
142 true /* out of process */, | 142 true /* out of process */, |
143 Manifest::INTERNAL, | 143 Manifest::INTERNAL, |
144 0, /* no special creation flags */ | 144 0, /* no special creation flags */ |
145 temp_dir_, | 145 temp_dir_, |
146 file_thread_proxy, | 146 file_thread_proxy.get(), |
147 this)); | 147 this)); |
148 unpacker->Start(); | 148 unpacker->Start(); |
149 } | 149 } |
150 | 150 |
151 // The file being validated. | 151 // The file being validated. |
152 const base::FilePath& crx_file_; | 152 const base::FilePath& crx_file_; |
153 | 153 |
154 // The temporary directory where the sandboxed unpacker will do work. | 154 // The temporary directory where the sandboxed unpacker will do work. |
155 const base::FilePath& temp_dir_; | 155 const base::FilePath& temp_dir_; |
156 | 156 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 std::string id; | 330 std::string id; |
331 if (index == "1") { | 331 if (index == "1") { |
332 id = "nckgahadagoaajjgafhacjanaoiihapd"; | 332 id = "nckgahadagoaajjgafhacjanaoiihapd"; |
333 } else if (index == "2") { | 333 } else if (index == "2") { |
334 id = "ecglahbcnmdpdciemllbhojghbkagdje"; | 334 id = "ecglahbcnmdpdciemllbhojghbkagdje"; |
335 } | 335 } |
336 return id; | 336 return id; |
337 } | 337 } |
338 | 338 |
339 StartupHelper::~StartupHelper() { | 339 StartupHelper::~StartupHelper() { |
340 if (pack_job_) | 340 if (pack_job_.get()) |
341 pack_job_->ClearClient(); | 341 pack_job_->ClearClient(); |
342 } | 342 } |
343 | 343 |
344 } // namespace extensions | 344 } // namespace extensions |
OLD | NEW |