OLD | NEW |
1 // Copyright (c) 2011 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 "chrome_frame/cfproxy_private.h" | 5 #include "chrome_frame/cfproxy_private.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 #include "base/atomic_sequence_num.h" | 8 #include "base/atomic_sequence_num.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 259 |
260 SentMessages::reverse_iterator it = messages_sent.rbegin(); | 260 SentMessages::reverse_iterator it = messages_sent.rbegin(); |
261 for (; it != messages_sent.rend(); ++it) { | 261 for (; it != messages_sent.rend(); ++it) { |
262 SingleSentMessage* origin = it->second; | 262 SingleSentMessage* origin = it->second; |
263 DispatchReplyFail(origin->type_, origin->delegate_, origin->ctx_); | 263 DispatchReplyFail(origin->type_, origin->delegate_, origin->ctx_); |
264 delete origin; | 264 delete origin; |
265 } | 265 } |
266 messages_sent.clear(); | 266 messages_sent.clear(); |
267 } | 267 } |
268 | 268 |
269 static base::AtomicSequenceNumber g_proxy_channel_id(base::LINKER_INITIALIZED); | 269 static base::StaticAtomicSequenceNumber g_proxy_channel_id; |
270 std::string GenerateChannelId() { | 270 std::string GenerateChannelId() { |
271 return StringPrintf("ChromeTestingInterface:%u.%d", | 271 return StringPrintf("ChromeTestingInterface:%u.%d", |
272 base::GetCurrentProcId(), g_proxy_channel_id.GetNext() + 0xC000); | 272 base::GetCurrentProcId(), g_proxy_channel_id.GetNext() + 0xC000); |
273 } | 273 } |
274 | 274 |
275 std::wstring BuildCmdLine(const std::string& channel_id, | 275 std::wstring BuildCmdLine(const std::string& channel_id, |
276 const FilePath& profile_path, | 276 const FilePath& profile_path, |
277 const std::wstring& extra_args) { | 277 const std::wstring& extra_args) { |
278 std::wstring command_line_string; | 278 std::wstring command_line_string; |
279 scoped_ptr<CommandLine> command_line; | 279 scoped_ptr<CommandLine> command_line; |
(...skipping 23 matching lines...) Expand all Loading... |
303 | 303 |
304 command_line_string = command_line->GetCommandLineString(); | 304 command_line_string = command_line->GetCommandLineString(); |
305 if (!extra_args.empty()) { | 305 if (!extra_args.empty()) { |
306 command_line_string.append(L" "); | 306 command_line_string.append(L" "); |
307 command_line_string.append(extra_args); | 307 command_line_string.append(extra_args); |
308 } | 308 } |
309 } | 309 } |
310 | 310 |
311 return command_line_string; | 311 return command_line_string; |
312 } | 312 } |
OLD | NEW |