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

Side by Side Diff: remoting/protocol/protocol_test_client.cc

Issue 6805019: Move crypto files out of base, to a top level directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fixes comments by eroman Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/jingle_session_unittest.cc ('k') | remoting/remoting.gyp » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if !defined(OS_WIN) 7 #if !defined(OS_WIN)
8 extern "C" { 8 extern "C" {
9 #include <unistd.h> 9 #include <unistd.h>
10 } 10 }
11 #endif // !defined(OS_WIN) 11 #endif // !defined(OS_WIN)
12 12
13 #include <iostream> 13 #include <iostream>
14 #include <list> 14 #include <list>
15 15
16 #include "base/at_exit.h" 16 #include "base/at_exit.h"
17 #include "base/command_line.h" 17 #include "base/command_line.h"
18 #include "base/nss_util.h"
19 #include "base/test/mock_chrome_application_mac.h" 18 #include "base/test/mock_chrome_application_mac.h"
20 #include "base/time.h" 19 #include "base/time.h"
20 #include "crypto/nss_util.h"
21 #include "net/base/completion_callback.h" 21 #include "net/base/completion_callback.h"
22 #include "net/base/io_buffer.h" 22 #include "net/base/io_buffer.h"
23 #include "net/base/net_errors.h" 23 #include "net/base/net_errors.h"
24 #include "net/socket/socket.h" 24 #include "net/socket/socket.h"
25 #include "remoting/base/constants.h" 25 #include "remoting/base/constants.h"
26 #include "remoting/jingle_glue/jingle_client.h" 26 #include "remoting/jingle_glue/jingle_client.h"
27 #include "remoting/jingle_glue/jingle_thread.h" 27 #include "remoting/jingle_glue/jingle_thread.h"
28 #include "remoting/protocol/jingle_session_manager.h" 28 #include "remoting/protocol/jingle_session_manager.h"
29 29
30 using remoting::kChromotingTokenServiceName; 30 using remoting::kChromotingTokenServiceName;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 int main(int argc, char** argv) { 351 int main(int argc, char** argv) {
352 CommandLine::Init(argc, argv); 352 CommandLine::Init(argc, argv);
353 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 353 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
354 354
355 if (!cmd_line->args().empty() || cmd_line->HasSwitch("help")) 355 if (!cmd_line->args().empty() || cmd_line->HasSwitch("help"))
356 usage(argv[0]); 356 usage(argv[0]);
357 357
358 base::AtExitManager exit_manager; 358 base::AtExitManager exit_manager;
359 359
360 base::EnsureNSPRInit(); 360 crypto::EnsureNSPRInit();
361 base::EnsureNSSInit(); 361 crypto::EnsureNSSInit();
362 362
363 #if defined(OS_MACOSX) 363 #if defined(OS_MACOSX)
364 mock_cr_app::RegisterMockCrApp(); 364 mock_cr_app::RegisterMockCrApp();
365 #endif // OS_MACOSX 365 #endif // OS_MACOSX
366 366
367 std::string host_jid(cmd_line->GetSwitchValueASCII("host_jid")); 367 std::string host_jid(cmd_line->GetSwitchValueASCII("host_jid"));
368 368
369 if (!cmd_line->HasSwitch("username")) 369 if (!cmd_line->HasSwitch("username"))
370 usage(argv[0]); 370 usage(argv[0]);
371 std::string username(cmd_line->GetSwitchValueASCII("username")); 371 std::string username(cmd_line->GetSwitchValueASCII("username"));
372 372
373 if (!cmd_line->HasSwitch("auth_token")) 373 if (!cmd_line->HasSwitch("auth_token"))
374 usage(argv[0]); 374 usage(argv[0]);
375 std::string auth_token(cmd_line->GetSwitchValueASCII("auth_token")); 375 std::string auth_token(cmd_line->GetSwitchValueASCII("auth_token"));
376 376
377 scoped_refptr<ProtocolTestClient> client(new ProtocolTestClient()); 377 scoped_refptr<ProtocolTestClient> client(new ProtocolTestClient());
378 378
379 client->Run(username, auth_token, host_jid); 379 client->Run(username, auth_token, host_jid);
380 380
381 return 0; 381 return 0;
382 } 382 }
OLDNEW
« no previous file with comments | « remoting/protocol/jingle_session_unittest.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698