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

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

Issue 1282363003: Convert remaining StringToLowerASCII to ToLowerASCII (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 stream_.end = length; 57 stream_.end = length;
58 stream_.lastmodified = last_modified; 58 stream_.lastmodified = last_modified;
59 stream_.pdata = 0; 59 stream_.pdata = 0;
60 stream_.ndata = id->ndata; 60 stream_.ndata = id->ndata;
61 stream_.notifyData = notify_data_; 61 stream_.notifyData = notify_data_;
62 if (!headers_.empty()) 62 if (!headers_.empty())
63 stream_.headers = headers_.c_str(); 63 stream_.headers = headers_.c_str();
64 64
65 bool seekable_stream = false; 65 bool seekable_stream = false;
66 if (request_is_seekable) { 66 if (request_is_seekable) {
67 std::string headers_lc = base::StringToLowerASCII(headers); 67 std::string headers_lc = base::ToLowerASCII(headers);
68 if (headers_lc.find("accept-ranges: bytes") != std::string::npos) { 68 if (headers_lc.find("accept-ranges: bytes") != std::string::npos) {
69 seekable_stream = true; 69 seekable_stream = true;
70 } 70 }
71 } 71 }
72 72
73 const char* char_mime_type = "application/x-unknown-content-type"; 73 const char* char_mime_type = "application/x-unknown-content-type";
74 std::string temp_mime_type; 74 std::string temp_mime_type;
75 if (!mime_type.empty()) { 75 if (!mime_type.empty()) {
76 char_mime_type = mime_type.c_str(); 76 char_mime_type = mime_type.c_str();
77 } else { 77 } else {
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 notify_needed_ = false; 273 notify_needed_ = false;
274 } 274 }
275 } 275 }
276 276
277 bool PluginStream::RequestedPluginModeIsAsFile() const { 277 bool PluginStream::RequestedPluginModeIsAsFile() const {
278 return (requested_plugin_mode_ == NP_ASFILE || 278 return (requested_plugin_mode_ == NP_ASFILE ||
279 requested_plugin_mode_ == NP_ASFILEONLY); 279 requested_plugin_mode_ == NP_ASFILEONLY);
280 } 280 }
281 281
282 } // namespace content 282 } // 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