| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome_frame/test/net/process_singleton_subclass.h" | 5 #include "chrome_frame/test/net/process_singleton_subclass.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "chrome/browser/browser_process_impl.h" | 10 #include "chrome/browser/browser_process_impl.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // Get current directory. | 92 // Get current directory. |
| 93 const wchar_t* cur_dir = begin; | 93 const wchar_t* cur_dir = begin; |
| 94 begin = eos + 1; | 94 begin = eos + 1; |
| 95 EXPECT_TRUE(begin <= end); | 95 EXPECT_TRUE(begin <= end); |
| 96 eos = wmemchr(begin, kNull, end - begin); | 96 eos = wmemchr(begin, kNull, end - begin); |
| 97 // eos might be equal to end at this point. | 97 // eos might be equal to end at this point. |
| 98 | 98 |
| 99 // Get command line. | 99 // Get command line. |
| 100 std::wstring cmd_line(begin, static_cast<size_t>(end - begin)); | 100 std::wstring cmd_line(begin, static_cast<size_t>(end - begin)); |
| 101 | 101 |
| 102 CommandLine parsed_command_line(L""); | 102 CommandLine parsed_command_line = CommandLine::FromString(cmd_line); |
| 103 parsed_command_line.ParseFromString(cmd_line); | |
| 104 std::string channel_id(WideToASCII(parsed_command_line.GetSwitchValue( | 103 std::string channel_id(WideToASCII(parsed_command_line.GetSwitchValue( |
| 105 switches::kAutomationClientChannelID))); | 104 switches::kAutomationClientChannelID))); |
| 106 EXPECT_FALSE(channel_id.empty()); | 105 EXPECT_FALSE(channel_id.empty()); |
| 107 | 106 |
| 108 delegate_->OnConnectAutomationProviderToChannel(channel_id); | 107 delegate_->OnConnectAutomationProviderToChannel(channel_id); |
| 109 } | 108 } |
| 110 return TRUE; | 109 return TRUE; |
| 111 } | 110 } |
| OLD | NEW |