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

Side by Side Diff: utils.h

Issue 6516026: AU: Make proxy resolution asynchronous. (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fix utils.* include paths Created 9 years, 10 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 | « proxy_resolver.cc ('k') | utils.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) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_UTILS_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_UTILS_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UTILS_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UTILS_H__
7 7
8 #include <errno.h> 8 #include <errno.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // Compares process priorities and returns an integer that is less 236 // Compares process priorities and returns an integer that is less
237 // than, equal to or greater than 0 if |priority_lhs| is, 237 // than, equal to or greater than 0 if |priority_lhs| is,
238 // respectively, lower than, same as or higher than |priority_rhs|. 238 // respectively, lower than, same as or higher than |priority_rhs|.
239 int ComparePriorities(ProcessPriority priority_lhs, 239 int ComparePriorities(ProcessPriority priority_lhs,
240 ProcessPriority priority_rhs); 240 ProcessPriority priority_rhs);
241 241
242 // Sets the current process priority to |priority|. Returns true on 242 // Sets the current process priority to |priority|. Returns true on
243 // success, false otherwise. 243 // success, false otherwise.
244 bool SetProcessPriority(ProcessPriority priority); 244 bool SetProcessPriority(ProcessPriority priority);
245 245
246 // Assumes data points to a Closure. Runs it and returns FALSE;
247 gboolean GlibRunClosure(gpointer data);
248
246 } // namespace utils 249 } // namespace utils
247 250
248 // Class to unmount FS when object goes out of scope 251 // Class to unmount FS when object goes out of scope
249 class ScopedFilesystemUnmounter { 252 class ScopedFilesystemUnmounter {
250 public: 253 public:
251 explicit ScopedFilesystemUnmounter(const std::string& mountpoint) 254 explicit ScopedFilesystemUnmounter(const std::string& mountpoint)
252 : mountpoint_(mountpoint), 255 : mountpoint_(mountpoint),
253 should_unmount_(true) {} 256 should_unmount_(true) {}
254 ~ScopedFilesystemUnmounter() { 257 ~ScopedFilesystemUnmounter() {
255 if (should_unmount_) { 258 if (should_unmount_) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 if (_error) { \ 423 if (_error) { \
421 errno = _error; \ 424 errno = _error; \
422 LOG(ERROR) << #_x " failed: " << _error; \ 425 LOG(ERROR) << #_x " failed: " << _error; \
423 return false; \ 426 return false; \
424 } \ 427 } \
425 } while (0) 428 } while (0)
426 429
427 430
428 431
429 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UTILS_H__ 432 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UTILS_H__
OLDNEW
« no previous file with comments | « proxy_resolver.cc ('k') | utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698