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

Side by Side Diff: utils.h

Issue 3965001: AU: Restrict URL/version change over D-Bus to non-official builds only. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Created 10 years, 2 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 | « dbus_service.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>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include <glib.h> 15 #include <glib.h>
16 16
17 #include "update_engine/action.h" 17 #include "update_engine/action.h"
18 #include "update_engine/action_processor.h" 18 #include "update_engine/action_processor.h"
19 19
20 namespace chromeos_update_engine { 20 namespace chromeos_update_engine {
21 21
22 namespace utils { 22 namespace utils {
23 23
24 // Returns true if this is an official Chrome OS build, false 24 // Returns true if this is an official Chrome OS build, false otherwise.
25 // otherwise. Currently, this routine errs on the official build side
26 // -- if it doesn't recognize the update track as non-official, it
27 // assumes the build is official.
28 bool IsOfficialBuild(); 25 bool IsOfficialBuild();
29 26
30 // Returns true if the OOBE process has been completed and EULA accepted, false 27 // Returns true if the OOBE process has been completed and EULA accepted, false
31 // otherwise. 28 // otherwise.
32 bool IsOOBEComplete(); 29 bool IsOOBEComplete();
33 30
34 // Writes the data passed to path. The file at path will be overwritten if it 31 // Writes the data passed to path. The file at path will be overwritten if it
35 // exists. Returns true on success, false otherwise. 32 // exists. Returns true on success, false otherwise.
36 bool WriteFile(const char* path, const char* data, int data_len); 33 bool WriteFile(const char* path, const char* data, int data_len);
37 34
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 bool _success = (_x); \ 358 bool _success = (_x); \
362 if (!_success) { \ 359 if (!_success) { \
363 LOG(ERROR) << #_x " failed."; \ 360 LOG(ERROR) << #_x " failed."; \
364 return; \ 361 return; \
365 } \ 362 } \
366 } while (0) 363 } while (0)
367 364
368 365
369 366
370 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UTILS_H__ 367 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UTILS_H__
OLDNEW
« no previous file with comments | « dbus_service.cc ('k') | utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698