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

Side by Side Diff: content/browser/media/cdm/browser_cdm_manager.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 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/media/cdm/browser_cdm_manager.h" 5 #include "content/browser/media/cdm/browser_cdm_manager.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/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/task_runner.h" 10 #include "base/task_runner.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 break; 215 break;
216 case CREATE_SESSION_TYPE_MP4: 216 case CREATE_SESSION_TYPE_MP4:
217 mime_type = "video/mp4"; 217 mime_type = "video/mp4";
218 break; 218 break;
219 default: 219 default:
220 NOTREACHED(); 220 NOTREACHED();
221 return; 221 return;
222 } 222 }
223 223
224 #if defined(OS_ANDROID) 224 #if defined(OS_ANDROID)
225 if (CommandLine::ForCurrentProcess() 225 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
226 ->HasSwitch(switches::kDisableInfobarForProtectedMediaIdentifier)) { 226 switches::kDisableInfobarForProtectedMediaIdentifier)) {
227 CreateSessionIfPermitted( 227 CreateSessionIfPermitted(
228 render_frame_id, cdm_id, session_id, mime_type, init_data, true); 228 render_frame_id, cdm_id, session_id, mime_type, init_data, true);
229 return; 229 return;
230 } 230 }
231 #endif 231 #endif
232 232
233 BrowserCdm* cdm = GetCdm(render_frame_id, cdm_id); 233 BrowserCdm* cdm = GetCdm(render_frame_id, cdm_id);
234 if (!cdm) { 234 if (!cdm) {
235 DLOG(WARNING) << "No CDM found for: " << render_frame_id << ", " << cdm_id; 235 DLOG(WARNING) << "No CDM found for: " << render_frame_id << ", " << cdm_id;
236 SendSessionError(render_frame_id, cdm_id, session_id); 236 SendSessionError(render_frame_id, cdm_id, session_id);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 DLOG(WARNING) << "No CDM found for: " << render_frame_id << ", " << cdm_id; 415 DLOG(WARNING) << "No CDM found for: " << render_frame_id << ", " << cdm_id;
416 SendSessionError(render_frame_id, cdm_id, session_id); 416 SendSessionError(render_frame_id, cdm_id, session_id);
417 return; 417 return;
418 } 418 }
419 419
420 // This could fail, in which case a SessionError will be fired. 420 // This could fail, in which case a SessionError will be fired.
421 cdm->CreateSession(session_id, content_type, &init_data[0], init_data.size()); 421 cdm->CreateSession(session_id, content_type, &init_data[0], init_data.size());
422 } 422 }
423 423
424 } // namespace content 424 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_url_loader_unittest.cc ('k') | content/browser/media/encrypted_media_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698