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

Side by Side Diff: Source/core/inspector/InspectorFrontendHost.cpp

Issue 15333014: DevTools: InspectorFrontendHost::loadResourceSynchronously() builds ASCII-only results (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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
« no previous file with comments | « LayoutTests/inspector/load-resource-synchronously-utf8-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 String InspectorFrontendHost::loadResourceSynchronously(const String& url) 261 String InspectorFrontendHost::loadResourceSynchronously(const String& url)
262 { 262 {
263 ResourceRequest request(url); 263 ResourceRequest request(url);
264 request.setHTTPMethod("GET"); 264 request.setHTTPMethod("GET");
265 265
266 Vector<char> data; 266 Vector<char> data;
267 ResourceError error; 267 ResourceError error;
268 ResourceResponse response; 268 ResourceResponse response;
269 m_frontendPage->mainFrame()->loader()->loadResourceSynchronously(request, Do NotAllowStoredCredentials, error, response, data); 269 m_frontendPage->mainFrame()->loader()->loadResourceSynchronously(request, Do NotAllowStoredCredentials, error, response, data);
270 return String(data.data(), data.size()); 270 // |data| contains raw UTF8 bytes of the |url| contents.
vsevik 2013/05/21 07:40:45 Please remove this comment
271 return String::fromUTF8(data.data(), data.size());
271 } 272 }
272 273
273 String InspectorFrontendHost::getSelectionBackgroundColor() 274 String InspectorFrontendHost::getSelectionBackgroundColor()
274 { 275 {
275 Color color = m_frontendPage->theme()->activeSelectionBackgroundColor(); 276 Color color = m_frontendPage->theme()->activeSelectionBackgroundColor();
276 return color.isValid() ? color.serialized() : ""; 277 return color.isValid() ? color.serialized() : "";
277 } 278 }
278 279
279 String InspectorFrontendHost::getSelectionForegroundColor() 280 String InspectorFrontendHost::getSelectionForegroundColor()
280 { 281 {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 { 326 {
326 return false; 327 return false;
327 } 328 }
328 329
329 String InspectorFrontendHost::hiddenPanels() 330 String InspectorFrontendHost::hiddenPanels()
330 { 331 {
331 return ""; 332 return "";
332 } 333 }
333 334
334 } // namespace WebCore 335 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/inspector/load-resource-synchronously-utf8-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698