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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/user_image_source.cc

Issue 9150017: Add a Content API around BrowserChildProcessHost, similar to what was done with ChildProcessHost.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix?! Created 8 years, 11 months 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
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/ui/webui/options/chromeos/user_image_source.h" 5 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h"
6 6
7 #include "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "base/message_loop.h"
8 #include "chrome/browser/chromeos/login/user_manager.h" 9 #include "chrome/browser/chromeos/login/user_manager.h"
9 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
10 #include "grit/theme_resources.h" 11 #include "grit/theme_resources.h"
11 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/gfx/codec/png_codec.h" 13 #include "ui/gfx/codec/png_codec.h"
13 14
14 namespace chromeos { 15 namespace chromeos {
15 16
16 std::vector<unsigned char> UserImageSource::GetUserImage( 17 std::vector<unsigned char> UserImageSource::GetUserImage(
17 const std::string& email) const { 18 const std::string& email) const {
(...skipping 26 matching lines...) Expand all
44 SendResponse(request_id, new RefCountedBytes(GetUserImage(email))); 45 SendResponse(request_id, new RefCountedBytes(GetUserImage(email)));
45 } 46 }
46 47
47 std::string UserImageSource::GetMimeType(const std::string&) const { 48 std::string UserImageSource::GetMimeType(const std::string&) const {
48 // We need to explicitly return a mime type, otherwise if the user tries to 49 // We need to explicitly return a mime type, otherwise if the user tries to
49 // drag the image they get no extension. 50 // drag the image they get no extension.
50 return "image/png"; 51 return "image/png";
51 } 52 }
52 53
53 } // namespace chromeos 54 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698