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

Side by Side Diff: chrome/browser/dom_ui/web_ui_util.cc

Issue 6312156: Change includes of gfx/* to ui/gfx/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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/dom_ui/web_ui_util.h" 5 #include "chrome/browser/dom_ui/web_ui_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "gfx/codec/png_codec.h"
13 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/gfx/codec/png_codec.h"
14 14
15 namespace web_ui_util { 15 namespace web_ui_util {
16 16
17 std::string GetJsonResponseFromFirstArgumentInList(const ListValue* args) { 17 std::string GetJsonResponseFromFirstArgumentInList(const ListValue* args) {
18 return GetJsonResponseFromArgumentList(args, 0); 18 return GetJsonResponseFromArgumentList(args, 0);
19 } 19 }
20 20
21 std::string GetJsonResponseFromArgumentList(const ListValue* args, 21 std::string GetJsonResponseFromArgumentList(const ListValue* args,
22 size_t list_index) { 22 size_t list_index) {
23 std::string result; 23 std::string result;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 scoped_refptr<RefCountedMemory> raw_icon(icon_data); 55 scoped_refptr<RefCountedMemory> raw_icon(icon_data);
56 std::string str_url; 56 std::string str_url;
57 std::copy(raw_icon->front(), raw_icon->front() + raw_icon->size(), 57 std::copy(raw_icon->front(), raw_icon->front() + raw_icon->size(),
58 std::back_inserter(str_url)); 58 std::back_inserter(str_url));
59 base::Base64Encode(str_url, &str_url); 59 base::Base64Encode(str_url, &str_url);
60 str_url.insert(0, "data:image/png;base64,"); 60 str_url.insert(0, "data:image/png;base64,");
61 return str_url; 61 return str_url;
62 } 62 }
63 63
64 } // namespace web_ui_util 64 } // namespace web_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/options/certificate_manager_handler.h ('k') | chrome/browser/download/download_file_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698