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

Side by Side Diff: chrome/common/mac/mock_launchd.cc

Issue 10800052: More -Wunused-private-field cleanups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/mac/mock_launchd.h ('k') | chrome/installer/gcapi_mac/gcapi.mm » ('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) 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 "chrome/common/mac/mock_launchd.h" 5 #include "chrome/common/mac/mock_launchd.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 #include <sys/socket.h> 8 #include <sys/socket.h>
9 #include <sys/un.h> 9 #include <sys/un.h>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 MockLaunchd::MockLaunchd(const FilePath& file, MessageLoop* loop, 96 MockLaunchd::MockLaunchd(const FilePath& file, MessageLoop* loop,
97 bool create_socket, bool as_service) 97 bool create_socket, bool as_service)
98 : file_(file), 98 : file_(file),
99 message_loop_(loop), 99 message_loop_(loop),
100 create_socket_(create_socket), 100 create_socket_(create_socket),
101 as_service_(as_service), 101 as_service_(as_service),
102 restart_called_(false), 102 restart_called_(false),
103 remove_called_(false), 103 remove_called_(false),
104 job_called_(false),
105 checkin_called_(false), 104 checkin_called_(false),
106 write_called_(false), 105 write_called_(false),
107 delete_called_(false) { 106 delete_called_(false) {
108 std::string pipe_suffix("_SOCKET"); 107 std::string pipe_suffix("_SOCKET");
109 FilePath socket_path = file_; 108 FilePath socket_path = file_;
110 while (socket_path.value().length() + pipe_suffix.length() > 109 while (socket_path.value().length() + pipe_suffix.length() >
111 kMaxPipeNameLength - 2) { 110 kMaxPipeNameLength - 2) {
112 socket_path = socket_path.DirName(); 111 socket_path = socket_path.DirName();
113 } 112 }
114 pipe_name_ = socket_path.value() + pipe_suffix; 113 pipe_name_ = socket_path.value() + pipe_suffix;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 Type type, 292 Type type,
294 CFStringRef name) { 293 CFStringRef name) {
295 delete_called_ = true; 294 delete_called_ = true;
296 return true; 295 return true;
297 } 296 }
298 297
299 void MockLaunchd::SignalReady() { 298 void MockLaunchd::SignalReady() {
300 ASSERT_TRUE(as_service_); 299 ASSERT_TRUE(as_service_);
301 running_lock_.reset(TakeNamedLock(pipe_name_, true)); 300 running_lock_.reset(TakeNamedLock(pipe_name_, true));
302 } 301 }
OLDNEW
« no previous file with comments | « chrome/common/mac/mock_launchd.h ('k') | chrome/installer/gcapi_mac/gcapi.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698