Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Side by Side Diff: chrome/browser/image_decoder.cc

Issue 8510069: Make ProfileImageDownloader available to non-chromeos code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/image_decoder.h ('k') | chrome/browser/profiles/profile_downloader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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; 12 using content::BrowserThread;
13 13
14 namespace chromeos {
15
16 ImageDecoder::ImageDecoder(Delegate* delegate, 14 ImageDecoder::ImageDecoder(Delegate* delegate,
17 const std::string& image_data) 15 const std::string& image_data)
18 : delegate_(delegate), 16 : delegate_(delegate),
19 image_data_(image_data.begin(), image_data.end()), 17 image_data_(image_data.begin(), image_data.end()),
20 target_thread_id_(BrowserThread::UI) { 18 target_thread_id_(BrowserThread::UI) {
21 } 19 }
22 20
23 ImageDecoder::~ImageDecoder() {} 21 ImageDecoder::~ImageDecoder() {}
24 22
25 void ImageDecoder::Start() { 23 void ImageDecoder::Start() {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 55 }
58 56
59 void ImageDecoder::DecodeImageInSandbox( 57 void ImageDecoder::DecodeImageInSandbox(
60 const std::vector<unsigned char>& image_data) { 58 const std::vector<unsigned char>& image_data) {
61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 59 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
62 UtilityProcessHost* utility_process_host = 60 UtilityProcessHost* utility_process_host =
63 new UtilityProcessHost(this, 61 new UtilityProcessHost(this,
64 target_thread_id_); 62 target_thread_id_);
65 utility_process_host->Send(new ChromeUtilityMsg_DecodeImage(image_data)); 63 utility_process_host->Send(new ChromeUtilityMsg_DecodeImage(image_data));
66 } 64 }
67
68 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/image_decoder.h ('k') | chrome/browser/profiles/profile_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698