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

Side by Side Diff: content/browser/media/webrtc_webcam_browsertest.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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "content/browser/web_contents/web_contents_impl.h" 7 #include "content/browser/web_contents/web_contents_impl.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "content/public/test/browser_test_utils.h" 9 #include "content/public/test/browser_test_utils.h"
10 #include "content/public/test/content_browser_test.h" 10 #include "content/public/test/content_browser_test.h"
(...skipping 10 matching lines...) Expand all
21 base::ASCIIToUTF16(switches::kUseFakeDeviceForMediaStream); 21 base::ASCIIToUTF16(switches::kUseFakeDeviceForMediaStream);
22 #else 22 #else
23 switches::kUseFakeDeviceForMediaStream; 23 switches::kUseFakeDeviceForMediaStream;
24 #endif 24 #endif
25 25
26 bool IsUseFakeDeviceForMediaStream(const base::CommandLine::StringType& arg) { 26 bool IsUseFakeDeviceForMediaStream(const base::CommandLine::StringType& arg) {
27 return arg.find(FAKE_DEVICE_FLAG) != std::string::npos; 27 return arg.find(FAKE_DEVICE_FLAG) != std::string::npos;
28 } 28 }
29 29
30 void RemoveFakeDeviceFromCommandLine(base::CommandLine* command_line) { 30 void RemoveFakeDeviceFromCommandLine(base::CommandLine* command_line) {
31 CommandLine::StringVector argv = command_line->argv(); 31 base::CommandLine::StringVector argv = command_line->argv();
32 argv.erase(std::remove_if(argv.begin(), argv.end(), 32 argv.erase(std::remove_if(argv.begin(), argv.end(),
33 IsUseFakeDeviceForMediaStream), 33 IsUseFakeDeviceForMediaStream),
34 argv.end()); 34 argv.end());
35 command_line->InitFromArgv(argv); 35 command_line->InitFromArgv(argv);
36 } 36 }
37 37
38 } // namespace 38 } // namespace
39 39
40 namespace content { 40 namespace content {
41 41
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 if (result == "640x480" || result == "480x640") { 94 if (result == "640x480" || result == "480x640") {
95 // Don't care if the device happens to be in landscape or portrait mode 95 // Don't care if the device happens to be in landscape or portrait mode
96 // since we don't know how it is oriented in the lab :) 96 // since we don't know how it is oriented in the lab :)
97 return; 97 return;
98 } 98 }
99 FAIL() << "Expected resolution to be 640x480 or 480x640, got" << result; 99 FAIL() << "Expected resolution to be 640x480 or 480x640, got" << result;
100 } 100 }
101 101
102 } // namespace content 102 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_internals_browsertest.cc ('k') | content/browser/net/sqlite_persistent_cookie_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698