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

Side by Side Diff: ipc/ipc_channel_win.cc

Issue 1179973004: Fix win style errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from thakis. Created 5 years, 6 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 | « ipc/ipc_channel_win.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ipc/ipc_channel_win.h" 5 #include "ipc/ipc_channel_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 28 matching lines...) Expand all
39 Listener* listener, 39 Listener* listener,
40 AttachmentBroker* broker) 40 AttachmentBroker* broker)
41 : ChannelReader(listener), 41 : ChannelReader(listener),
42 input_state_(this), 42 input_state_(this),
43 output_state_(this), 43 output_state_(this),
44 peer_pid_(base::kNullProcessId), 44 peer_pid_(base::kNullProcessId),
45 waiting_connect_(mode & MODE_SERVER_FLAG), 45 waiting_connect_(mode & MODE_SERVER_FLAG),
46 processing_incoming_(false), 46 processing_incoming_(false),
47 validate_client_(false), 47 validate_client_(false),
48 client_secret_(0), 48 client_secret_(0),
49 weak_factory_(this), 49 broker_(broker),
50 broker_(broker) { 50 weak_factory_(this) {
51 CreatePipe(channel_handle, mode); 51 CreatePipe(channel_handle, mode);
52 } 52 }
53 53
54 ChannelWin::~ChannelWin() { 54 ChannelWin::~ChannelWin() {
55 Close(); 55 Close();
56 } 56 }
57 57
58 void ChannelWin::Close() { 58 void ChannelWin::Close() {
59 if (thread_check_.get()) 59 if (thread_check_.get())
60 DCHECK(thread_check_->CalledOnValidThread()); 60 DCHECK(thread_check_->CalledOnValidThread());
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 int secret; 510 int secret;
511 do { // Guarantee we get a non-zero value. 511 do { // Guarantee we get a non-zero value.
512 secret = base::RandInt(0, std::numeric_limits<int>::max()); 512 secret = base::RandInt(0, std::numeric_limits<int>::max());
513 } while (secret == 0); 513 } while (secret == 0);
514 514
515 id.append(GenerateUniqueRandomChannelID()); 515 id.append(GenerateUniqueRandomChannelID());
516 return id.append(base::StringPrintf("\\%d", secret)); 516 return id.append(base::StringPrintf("\\%d", secret));
517 } 517 }
518 518
519 } // namespace IPC 519 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698