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

Side by Side Diff: ppapi/proxy/ppp_messaging_proxy_perftest.cc

Issue 819203002: 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
« no previous file with comments | « ppapi/proxy/pdf_resource.cc ('k') | ppapi/shared_impl/ppapi_permissions.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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/string_number_conversions.h" 6 #include "base/strings/string_number_conversions.h"
7 #include "base/test/perf_time_logger.h" 7 #include "base/test/perf_time_logger.h"
8 #include "ppapi/c/ppp_messaging.h" 8 #include "ppapi/c/ppp_messaging.h"
9 #include "ppapi/proxy/ppapi_messages.h" 9 #include "ppapi/proxy/ppapi_messages.h"
10 #include "ppapi/proxy/ppapi_proxy_test.h" 10 #include "ppapi/proxy/ppapi_proxy_test.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 }; 49 };
50 50
51 } // namespace 51 } // namespace
52 52
53 // Tests the performance of sending strings through the proxy. 53 // Tests the performance of sending strings through the proxy.
54 TEST_F(PppMessagingPerfTest, StringPerformance) { 54 TEST_F(PppMessagingPerfTest, StringPerformance) {
55 const PP_Instance kTestInstance = pp_instance(); 55 const PP_Instance kTestInstance = pp_instance();
56 int seed = 123; 56 int seed = 123;
57 int string_count = 1000; 57 int string_count = 1000;
58 int max_string_size = 1000000; 58 int max_string_size = 1000000;
59 CommandLine* command_line = CommandLine::ForCurrentProcess(); 59 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
60 if (command_line) { 60 if (command_line) {
61 if (command_line->HasSwitch("seed")) { 61 if (command_line->HasSwitch("seed")) {
62 base::StringToInt(command_line->GetSwitchValueASCII("seed"), 62 base::StringToInt(command_line->GetSwitchValueASCII("seed"),
63 &seed); 63 &seed);
64 } 64 }
65 if (command_line->HasSwitch("string_count")) { 65 if (command_line->HasSwitch("string_count")) {
66 base::StringToInt(command_line->GetSwitchValueASCII("string_count"), 66 base::StringToInt(command_line->GetSwitchValueASCII("string_count"),
67 &string_count); 67 &string_count);
68 } 68 }
69 if (command_line->HasSwitch("max_string_size")) { 69 if (command_line->HasSwitch("max_string_size")) {
(...skipping 14 matching lines...) Expand all
84 ppapi::proxy::SerializedVarSendInput(host().host_dispatcher(), 84 ppapi::proxy::SerializedVarSendInput(host().host_dispatcher(),
85 host_string))); 85 host_string)));
86 handle_message_called.Wait(); 86 handle_message_called.Wait();
87 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(host_string); 87 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(host_string);
88 } 88 }
89 } 89 }
90 90
91 } // namespace proxy 91 } // namespace proxy
92 } // namespace ppapi 92 } // namespace ppapi
93 93
OLDNEW
« no previous file with comments | « ppapi/proxy/pdf_resource.cc ('k') | ppapi/shared_impl/ppapi_permissions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698