OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 = CommandLine::FromString(cmd_line); | 102 CommandLine parsed_command_line = CommandLine::FromString(cmd_line); |
103 std::string channel_id(WideToASCII(parsed_command_line.GetSwitchValue( | 103 std::string channel_id = |
104 switches::kAutomationClientChannelID))); | 104 parsed_command_line.GetSwitchValueASCII( |
105 switches::kAutomationClientChannelID); | |
tony
2010/08/06 00:09:38
Nit: This can probably fit on 2 lines.
| |
105 EXPECT_FALSE(channel_id.empty()); | 106 EXPECT_FALSE(channel_id.empty()); |
106 | 107 |
107 delegate_->OnConnectAutomationProviderToChannel(channel_id); | 108 delegate_->OnConnectAutomationProviderToChannel(channel_id); |
108 } | 109 } |
109 return TRUE; | 110 return TRUE; |
110 } | 111 } |
OLD | NEW |