OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/login/image_decoder.h" | 5 #include "chrome/browser/chromeos/login/image_decoder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/common/chrome_utility_messages.h" | 9 #include "chrome/common/chrome_utility_messages.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
11 | 11 |
| 12 using content::BrowserThread; |
| 13 |
12 namespace chromeos { | 14 namespace chromeos { |
13 | 15 |
14 ImageDecoder::ImageDecoder(Delegate* delegate, | 16 ImageDecoder::ImageDecoder(Delegate* delegate, |
15 const std::string& image_data) | 17 const std::string& image_data) |
16 : delegate_(delegate), | 18 : delegate_(delegate), |
17 image_data_(image_data.begin(), image_data.end()), | 19 image_data_(image_data.begin(), image_data.end()), |
18 target_thread_id_(BrowserThread::UI) { | 20 target_thread_id_(BrowserThread::UI) { |
19 } | 21 } |
20 | 22 |
21 ImageDecoder::~ImageDecoder() {} | 23 ImageDecoder::~ImageDecoder() {} |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 void ImageDecoder::DecodeImageInSandbox( | 59 void ImageDecoder::DecodeImageInSandbox( |
58 const std::vector<unsigned char>& image_data) { | 60 const std::vector<unsigned char>& image_data) { |
59 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
60 UtilityProcessHost* utility_process_host = | 62 UtilityProcessHost* utility_process_host = |
61 new UtilityProcessHost(this, | 63 new UtilityProcessHost(this, |
62 target_thread_id_); | 64 target_thread_id_); |
63 utility_process_host->Send(new ChromeUtilityMsg_DecodeImage(image_data)); | 65 utility_process_host->Send(new ChromeUtilityMsg_DecodeImage(image_data)); |
64 } | 66 } |
65 | 67 |
66 } // namespace chromeos | 68 } // namespace chromeos |
OLD | NEW |