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

Side by Side Diff: chrome_frame/cfproxy_support.cc

Issue 9415039: Add base::StaticAtomicSequenceNumber. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update Created 8 years, 9 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
« no previous file with comments | « chrome/browser/extensions/extension_message_service.cc ('k') | ipc/ipc_sync_message.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) 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_message_service.cc ('k') | ipc/ipc_sync_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698