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

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

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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/site_isolation_policy.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 #include "content/child/npapi/plugin_instance.h" 5 #include "content/child/npapi/plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 // received. 553 // received.
554 std::vector<scoped_refptr<PluginStream> >::iterator stream_index; 554 std::vector<scoped_refptr<PluginStream> >::iterator stream_index;
555 for (stream_index = open_streams_.begin(); 555 for (stream_index = open_streams_.begin();
556 stream_index != open_streams_.end(); ++stream_index) { 556 stream_index != open_streams_.end(); ++stream_index) {
557 PluginStream* plugin_stream = stream_index->get(); 557 PluginStream* plugin_stream = stream_index->get();
558 if (plugin_stream->stream() == stream) { 558 if (plugin_stream->stream() == stream) {
559 // A stream becomes seekable the first time NPN_RequestRead 559 // A stream becomes seekable the first time NPN_RequestRead
560 // is called on it. 560 // is called on it.
561 plugin_stream->set_seekable(true); 561 plugin_stream->set_seekable(true);
562 562
563 if (CommandLine::ForCurrentProcess()->HasSwitch( 563 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
564 switches::kDisableDirectNPAPIRequests)) { 564 switches::kDisableDirectNPAPIRequests)) {
565 pending_range_requests_[++next_range_request_id_] = plugin_stream; 565 pending_range_requests_[++next_range_request_id_] = plugin_stream;
566 webplugin_->InitiateHTTPRangeRequest( 566 webplugin_->InitiateHTTPRangeRequest(
567 stream->url, range_info.c_str(), next_range_request_id_); 567 stream->url, range_info.c_str(), next_range_request_id_);
568 return; 568 return;
569 } else { 569 } else {
570 PluginStreamUrl* plugin_stream_url = 570 PluginStreamUrl* plugin_stream_url =
571 static_cast<PluginStreamUrl*>(plugin_stream); 571 static_cast<PluginStreamUrl*>(plugin_stream);
572 plugin_stream_url->FetchRange(range_info); 572 plugin_stream_url->FetchRange(range_info);
573 return; 573 return;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 if (plugin_stream->notify_data() == notify_data) { 688 if (plugin_stream->notify_data() == notify_data) {
689 PluginStreamUrl* plugin_stream_url = 689 PluginStreamUrl* plugin_stream_url =
690 static_cast<PluginStreamUrl*>(plugin_stream); 690 static_cast<PluginStreamUrl*>(plugin_stream);
691 plugin_stream_url->URLRedirectResponse(allow); 691 plugin_stream_url->URLRedirectResponse(allow);
692 break; 692 break;
693 } 693 }
694 } 694 }
695 } 695 }
696 696
697 } // namespace content 697 } // namespace content
OLDNEW
« no previous file with comments | « content/child/npapi/plugin_host.cc ('k') | content/child/site_isolation_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698