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

Side by Side Diff: content/child/npapi/plugin_stream.cc

Issue 448853002: Move StringToLowerASCII to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « content/child/npapi/plugin_host.cc ('k') | content/child/npapi/webplugin_delegate_impl_win.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // TODO : Support NP_ASFILEONLY mode 5 // TODO : Support NP_ASFILEONLY mode
6 // TODO : Support NP_SEEK mode 6 // TODO : Support NP_SEEK mode
7 // TODO : Support SEEKABLE=true in NewStream 7 // TODO : Support SEEKABLE=true in NewStream
8 8
9 #include "content/child/npapi/plugin_stream.h" 9 #include "content/child/npapi/plugin_stream.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 stream_.end = length; 55 stream_.end = length;
56 stream_.lastmodified = last_modified; 56 stream_.lastmodified = last_modified;
57 stream_.pdata = 0; 57 stream_.pdata = 0;
58 stream_.ndata = id->ndata; 58 stream_.ndata = id->ndata;
59 stream_.notifyData = notify_data_; 59 stream_.notifyData = notify_data_;
60 if (!headers_.empty()) 60 if (!headers_.empty())
61 stream_.headers = headers_.c_str(); 61 stream_.headers = headers_.c_str();
62 62
63 bool seekable_stream = false; 63 bool seekable_stream = false;
64 if (request_is_seekable) { 64 if (request_is_seekable) {
65 std::string headers_lc = StringToLowerASCII(headers); 65 std::string headers_lc = base::StringToLowerASCII(headers);
66 if (headers_lc.find("accept-ranges: bytes") != std::string::npos) { 66 if (headers_lc.find("accept-ranges: bytes") != std::string::npos) {
67 seekable_stream = true; 67 seekable_stream = true;
68 } 68 }
69 } 69 }
70 70
71 const char* char_mime_type = "application/x-unknown-content-type"; 71 const char* char_mime_type = "application/x-unknown-content-type";
72 std::string temp_mime_type; 72 std::string temp_mime_type;
73 if (!mime_type.empty()) { 73 if (!mime_type.empty()) {
74 char_mime_type = mime_type.c_str(); 74 char_mime_type = mime_type.c_str();
75 } else { 75 } else {
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 notify_needed_ = false; 271 notify_needed_ = false;
272 } 272 }
273 } 273 }
274 274
275 bool PluginStream::RequestedPluginModeIsAsFile() const { 275 bool PluginStream::RequestedPluginModeIsAsFile() const {
276 return (requested_plugin_mode_ == NP_ASFILE || 276 return (requested_plugin_mode_ == NP_ASFILE ||
277 requested_plugin_mode_ == NP_ASFILEONLY); 277 requested_plugin_mode_ == NP_ASFILEONLY);
278 } 278 }
279 279
280 } // namespace content 280 } // namespace content
OLDNEW
« no previous file with comments | « content/child/npapi/plugin_host.cc ('k') | content/child/npapi/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698