update_engine: Rename "chromeos" -> "brillo" in include paths and namespaces
libchromeos is transitioning to libbrillo and chromeos namespaces
and include directory is changing to brillo.
Bug: 24872993
Change-Id: I770659a95be380a50fe3b2ba9f91d65818f40945
diff --git a/boot_control_android.cc b/boot_control_android.cc
index 7cf42b6..9a4bd15 100644
--- a/boot_control_android.cc
+++ b/boot_control_android.cc
@@ -20,8 +20,8 @@
#include <base/files/file_util.h>
#include <base/logging.h>
#include <base/strings/string_util.h>
-#include <chromeos/make_unique_ptr.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/make_unique_ptr.h>
+#include <brillo/message_loops/message_loop.h>
#include <cutils/properties.h>
#include <fs_mgr.h>
@@ -60,7 +60,7 @@
if (!boot_control->Init()) {
return nullptr;
}
- return chromeos::make_unique_ptr(boot_control.release());
+ return brillo::make_unique_ptr(boot_control.release());
}
} // namespace boot_control
@@ -192,9 +192,9 @@
if (ret < 0) {
LOG(ERROR) << "Unable to mark boot successful: " << strerror(-ret);
}
- return chromeos::MessageLoop::current()->PostTask(
+ return brillo::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(callback, ret == 0)) !=
- chromeos::MessageLoop::kTaskIdNull;
+ brillo::MessageLoop::kTaskIdNull;
}
} // namespace chromeos_update_engine
diff --git a/boot_control_chromeos.cc b/boot_control_chromeos.cc
index d9a38b0..10d99e3 100644
--- a/boot_control_chromeos.cc
+++ b/boot_control_chromeos.cc
@@ -22,7 +22,7 @@
#include <base/files/file_path.h>
#include <base/files/file_util.h>
#include <base/strings/string_util.h>
-#include <chromeos/make_unique_ptr.h>
+#include <brillo/make_unique_ptr.h>
#include <rootdev/rootdev.h>
extern "C" {
@@ -81,7 +81,7 @@
if (!boot_control_chromeos->Init()) {
LOG(ERROR) << "Ignoring BootControlChromeOS failure. We won't run updates.";
}
- return chromeos::make_unique_ptr(boot_control_chromeos.release());
+ return brillo::make_unique_ptr(boot_control_chromeos.release());
}
} // namespace boot_control
diff --git a/bzip.cc b/bzip.cc
index 060284d..b329adc 100644
--- a/bzip.cc
+++ b/bzip.cc
@@ -66,7 +66,7 @@
uint32_t in_length)>
bool BzipData(const void* const in,
const size_t in_size,
- chromeos::Blob* const out) {
+ brillo::Blob* const out) {
TEST_AND_RETURN_FALSE(out);
out->clear();
if (in_size == 0) {
@@ -96,22 +96,22 @@
} // namespace
-bool BzipDecompress(const chromeos::Blob& in, chromeos::Blob* out) {
+bool BzipDecompress(const brillo::Blob& in, brillo::Blob* out) {
return BzipData<BzipBuffToBuffDecompress>(in.data(), in.size(), out);
}
-bool BzipCompress(const chromeos::Blob& in, chromeos::Blob* out) {
+bool BzipCompress(const brillo::Blob& in, brillo::Blob* out) {
return BzipData<BzipBuffToBuffCompress>(in.data(), in.size(), out);
}
namespace {
template<bool F(const void* const in,
const size_t in_size,
- chromeos::Blob* const out)>
+ brillo::Blob* const out)>
bool BzipString(const string& str,
- chromeos::Blob* out) {
+ brillo::Blob* out) {
TEST_AND_RETURN_FALSE(out);
- chromeos::Blob temp;
+ brillo::Blob temp;
TEST_AND_RETURN_FALSE(F(str.data(), str.size(), &temp));
out->clear();
out->insert(out->end(), temp.begin(), temp.end());
@@ -119,11 +119,11 @@
}
} // namespace
-bool BzipCompressString(const string& str, chromeos::Blob* out) {
+bool BzipCompressString(const string& str, brillo::Blob* out) {
return BzipString<BzipData<BzipBuffToBuffCompress>>(str, out);
}
-bool BzipDecompressString(const string& str, chromeos::Blob* out) {
+bool BzipDecompressString(const string& str, brillo::Blob* out) {
return BzipString<BzipData<BzipBuffToBuffDecompress>>(str, out);
}
diff --git a/bzip.h b/bzip.h
index 4a0b469..4293526 100644
--- a/bzip.h
+++ b/bzip.h
@@ -20,15 +20,15 @@
#include <string>
#include <vector>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
namespace chromeos_update_engine {
// Bzip2 compresses or decompresses str/in to out.
-bool BzipDecompress(const chromeos::Blob& in, chromeos::Blob* out);
-bool BzipCompress(const chromeos::Blob& in, chromeos::Blob* out);
-bool BzipCompressString(const std::string& str, chromeos::Blob* out);
-bool BzipDecompressString(const std::string& str, chromeos::Blob* out);
+bool BzipDecompress(const brillo::Blob& in, brillo::Blob* out);
+bool BzipCompress(const brillo::Blob& in, brillo::Blob* out);
+bool BzipCompressString(const std::string& str, brillo::Blob* out);
+bool BzipDecompressString(const std::string& str, brillo::Blob* out);
} // namespace chromeos_update_engine
diff --git a/bzip_extent_writer.cc b/bzip_extent_writer.cc
index 5f3afe9..4fe7148 100644
--- a/bzip_extent_writer.cc
+++ b/bzip_extent_writer.cc
@@ -21,7 +21,7 @@
namespace chromeos_update_engine {
namespace {
-const chromeos::Blob::size_type kOutputBufferLength = 16 * 1024;
+const brillo::Blob::size_type kOutputBufferLength = 16 * 1024;
}
bool BzipExtentWriter::Init(FileDescriptorPtr fd,
@@ -38,7 +38,7 @@
}
bool BzipExtentWriter::Write(const void* bytes, size_t count) {
- chromeos::Blob output_buffer(kOutputBufferLength);
+ brillo::Blob output_buffer(kOutputBufferLength);
// Copy the input data into |input_buffer_| only if |input_buffer_| already
// contains unconsumed data. Otherwise, process the data directly from the
@@ -75,7 +75,7 @@
// Store unconsumed data (if any) in |input_buffer_|.
if (stream_.avail_in || !input_buffer_.empty()) {
- chromeos::Blob new_input_buffer(input_end - stream_.avail_in, input_end);
+ brillo::Blob new_input_buffer(input_end - stream_.avail_in, input_end);
new_input_buffer.swap(input_buffer_);
}
diff --git a/bzip_extent_writer.h b/bzip_extent_writer.h
index 6941c66..c467670 100644
--- a/bzip_extent_writer.h
+++ b/bzip_extent_writer.h
@@ -21,7 +21,7 @@
#include <memory>
#include <vector>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/extent_writer.h"
#include "update_engine/utils.h"
@@ -49,7 +49,7 @@
private:
std::unique_ptr<ExtentWriter> next_; // The underlying ExtentWriter.
bz_stream stream_; // the libbz2 stream
- chromeos::Blob input_buffer_;
+ brillo::Blob input_buffer_;
};
} // namespace chromeos_update_engine
diff --git a/bzip_extent_writer_unittest.cc b/bzip_extent_writer_unittest.cc
index 986be9f..d84019a 100644
--- a/bzip_extent_writer_unittest.cc
+++ b/bzip_extent_writer_unittest.cc
@@ -25,7 +25,7 @@
#include <string>
#include <vector>
-#include <chromeos/make_unique_ptr.h>
+#include <brillo/make_unique_ptr.h>
#include <gtest/gtest.h>
#include "update_engine/test_utils.h"
@@ -79,19 +79,19 @@
};
BzipExtentWriter bzip_writer(
- chromeos::make_unique_ptr(new DirectExtentWriter()));
+ brillo::make_unique_ptr(new DirectExtentWriter()));
EXPECT_TRUE(bzip_writer.Init(fd_, extents, kBlockSize));
EXPECT_TRUE(bzip_writer.Write(test, sizeof(test)));
EXPECT_TRUE(bzip_writer.End());
- chromeos::Blob buf;
+ brillo::Blob buf;
EXPECT_TRUE(utils::ReadFile(path_, &buf));
EXPECT_EQ(strlen(test_uncompressed), buf.size());
EXPECT_EQ(string(buf.begin(), buf.end()), string(test_uncompressed));
}
TEST_F(BzipExtentWriterTest, ChunkedTest) {
- const chromeos::Blob::size_type kDecompressedLength = 2048 * 1024; // 2 MiB
+ const brillo::Blob::size_type kDecompressedLength = 2048 * 1024; // 2 MiB
string decompressed_path;
ASSERT_TRUE(utils::MakeTempFile("BzipExtentWriterTest-decompressed-XXXXXX",
&decompressed_path, nullptr));
@@ -106,7 +106,7 @@
extent.set_num_blocks(kDecompressedLength / kBlockSize + 1);
extents.push_back(extent);
- chromeos::Blob decompressed_data(kDecompressedLength);
+ brillo::Blob decompressed_data(kDecompressedLength);
test_utils::FillWithData(&decompressed_data);
EXPECT_TRUE(test_utils::WriteFileVector(
@@ -115,15 +115,15 @@
EXPECT_EQ(0, test_utils::System(
string("cat ") + decompressed_path + "|bzip2>" + compressed_path));
- chromeos::Blob compressed_data;
+ brillo::Blob compressed_data;
EXPECT_TRUE(utils::ReadFile(compressed_path, &compressed_data));
BzipExtentWriter bzip_writer(
- chromeos::make_unique_ptr(new DirectExtentWriter()));
+ brillo::make_unique_ptr(new DirectExtentWriter()));
EXPECT_TRUE(bzip_writer.Init(fd_, extents, kBlockSize));
- chromeos::Blob original_compressed_data = compressed_data;
- for (chromeos::Blob::size_type i = 0; i < compressed_data.size();
+ brillo::Blob original_compressed_data = compressed_data;
+ for (brillo::Blob::size_type i = 0; i < compressed_data.size();
i += kChunkSize) {
size_t this_chunk_size = min(kChunkSize, compressed_data.size() - i);
EXPECT_TRUE(bzip_writer.Write(&compressed_data[i], this_chunk_size));
@@ -133,7 +133,7 @@
// Check that the const input has not been clobbered.
test_utils::ExpectVectorsEq(original_compressed_data, compressed_data);
- chromeos::Blob output;
+ brillo::Blob output;
EXPECT_TRUE(utils::ReadFile(path_, &output));
EXPECT_EQ(kDecompressedLength, output.size());
test_utils::ExpectVectorsEq(decompressed_data, output);
diff --git a/chrome_browser_proxy_resolver.cc b/chrome_browser_proxy_resolver.cc
index a7ba7c2..fb74724 100644
--- a/chrome_browser_proxy_resolver.cc
+++ b/chrome_browser_proxy_resolver.cc
@@ -31,7 +31,7 @@
using base::StringTokenizer;
using base::TimeDelta;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using std::deque;
using std::make_pair;
using std::pair;
@@ -74,7 +74,7 @@
ProxiesResolvedFn callback,
void* data) {
int timeout = timeout_;
- chromeos::ErrorPtr error;
+ brillo::ErrorPtr error;
if (!libcros_proxy_->service_interface_proxy()->ResolveNetworkProxy(
url.c_str(),
kLibCrosProxyResolveSignalInterface,
diff --git a/chrome_browser_proxy_resolver.h b/chrome_browser_proxy_resolver.h
index 558b95a..84b0c28 100644
--- a/chrome_browser_proxy_resolver.h
+++ b/chrome_browser_proxy_resolver.h
@@ -24,7 +24,7 @@
#include <gtest/gtest_prod.h> // for FRIEND_TEST
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include "update_engine/libcros_proxy.h"
#include "update_engine/proxy_resolver.h"
@@ -52,7 +52,7 @@
FRIEND_TEST(ChromeBrowserProxyResolverTest, SuccessTest);
typedef std::multimap<std::string, std::pair<ProxiesResolvedFn, void*>>
CallbacksMap;
- typedef std::multimap<std::string, chromeos::MessageLoop::TaskId> TimeoutsMap;
+ typedef std::multimap<std::string, brillo::MessageLoop::TaskId> TimeoutsMap;
// Called when the signal in UpdateEngineLibcrosProxyResolvedInterface is
// connected.
diff --git a/chrome_browser_proxy_resolver_unittest.cc b/chrome_browser_proxy_resolver_unittest.cc
index d0a9289..7a4de3d 100644
--- a/chrome_browser_proxy_resolver_unittest.cc
+++ b/chrome_browser_proxy_resolver_unittest.cc
@@ -23,8 +23,8 @@
#include <gtest/gtest.h>
#include <base/bind.h>
-#include <chromeos/make_unique_ptr.h>
-#include <chromeos/message_loops/fake_message_loop.h>
+#include <brillo/make_unique_ptr.h>
+#include <brillo/message_loops/fake_message_loop.h>
#include "libcros/dbus-proxies.h"
#include "libcros/dbus-proxy-mocks.h"
@@ -33,7 +33,7 @@
using ::testing::Return;
using ::testing::StrEq;
using ::testing::_;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using org::chromium::LibCrosServiceInterfaceProxyMock;
using org::chromium::UpdateEngineLibcrosProxyResolvedInterfaceProxyMock;
using std::deque;
@@ -49,8 +49,8 @@
ue_proxy_resolved_interface_mock_(
new UpdateEngineLibcrosProxyResolvedInterfaceProxyMock()),
libcros_proxy_(
- chromeos::make_unique_ptr(service_interface_mock_),
- chromeos::make_unique_ptr(ue_proxy_resolved_interface_mock_)) {}
+ brillo::make_unique_ptr(service_interface_mock_),
+ brillo::make_unique_ptr(ue_proxy_resolved_interface_mock_)) {}
void SetUp() override {
loop_.SetAsCurrent();
@@ -78,7 +78,7 @@
void RunTest(bool chrome_replies, bool chrome_alive);
private:
- chromeos::FakeMessageLoop loop_{nullptr};
+ brillo::FakeMessageLoop loop_{nullptr};
// Local pointers to the mocks. The instances are owned by the
// |libcros_proxy_|.
diff --git a/connection_manager.cc b/connection_manager.cc
index 58e2292..0a1fcf2 100644
--- a/connection_manager.cc
+++ b/connection_manager.cc
@@ -174,8 +174,8 @@
}
bool ConnectionManager::GetDefaultServicePath(dbus::ObjectPath* out_path) {
- chromeos::VariantDictionary properties;
- chromeos::ErrorPtr error;
+ brillo::VariantDictionary properties;
+ brillo::ErrorPtr error;
ManagerProxyInterface* manager_proxy = shill_proxy_->GetManagerProxy();
if (!manager_proxy)
return false;
@@ -198,8 +198,8 @@
std::unique_ptr<ServiceProxyInterface> service =
shill_proxy_->GetServiceForPath(path);
- chromeos::VariantDictionary properties;
- chromeos::ErrorPtr error;
+ brillo::VariantDictionary properties;
+ brillo::ErrorPtr error;
TEST_AND_RETURN_FALSE(service->GetProperties(&properties, &error));
// Populate the out_tethering.
diff --git a/connection_manager_unittest.cc b/connection_manager_unittest.cc
index 2c1d881..5bd7179 100644
--- a/connection_manager_unittest.cc
+++ b/connection_manager_unittest.cc
@@ -20,10 +20,10 @@
#include <string>
#include <base/logging.h>
-#include <chromeos/any.h>
-#include <chromeos/make_unique_ptr.h>
-#include <chromeos/message_loops/fake_message_loop.h>
-#include <chromeos/variant_dictionary.h>
+#include <brillo/any.h>
+#include <brillo/make_unique_ptr.h>
+#include <brillo/message_loops/fake_message_loop.h>
+#include <brillo/variant_dictionary.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <shill/dbus-constants.h>
@@ -75,7 +75,7 @@
const char* service_tethering,
NetworkTethering expected_tethering);
- chromeos::FakeMessageLoop loop_{nullptr};
+ brillo::FakeMessageLoop loop_{nullptr};
FakeSystemState fake_system_state_;
FakeShillProxy fake_shill_proxy_;
@@ -94,7 +94,7 @@
// Create a dictionary of properties and optionally include the default
// service.
- chromeos::VariantDictionary reply_dict;
+ brillo::VariantDictionary reply_dict;
reply_dict["SomeOtherProperty"] = 0xC0FFEE;
if (default_service) {
@@ -109,7 +109,7 @@
const char* service_type,
const char* physical_technology,
const char* service_tethering) {
- chromeos::VariantDictionary reply_dict;
+ brillo::VariantDictionary reply_dict;
reply_dict["SomeOtherProperty"] = 0xC0FFEE;
if (service_type)
diff --git a/daemon.cc b/daemon.cc
index b7f4fc4..529af58 100644
--- a/daemon.cc
+++ b/daemon.cc
@@ -21,12 +21,12 @@
#include <base/bind.h>
#include <base/location.h>
#include <base/time/time.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include "update_engine/clock.h"
#include "update_engine/update_attempter.h"
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
namespace {
const int kDBusSystemMaxWaitSeconds = 2 * 60;
diff --git a/daemon.h b/daemon.h
index 8eb1102..01961bc 100644
--- a/daemon.h
+++ b/daemon.h
@@ -20,7 +20,7 @@
#include <memory>
#include <string>
-#include <chromeos/daemons/dbus_daemon.h>
+#include <brillo/daemons/dbus_daemon.h>
#include "update_engine/certificate_checker.h"
#include "update_engine/dbus_service.h"
@@ -29,7 +29,7 @@
namespace chromeos_update_engine {
-class UpdateEngineDaemon : public chromeos::DBusDaemon {
+class UpdateEngineDaemon : public brillo::DBusDaemon {
public:
UpdateEngineDaemon() = default;
@@ -42,7 +42,7 @@
// initialization.
void OnDBusRegistered(bool succeeded);
- // The Subprocess singleton class requires a chromeos::MessageLoop in the
+ // The Subprocess singleton class requires a brillo::MessageLoop in the
// current thread, so we need to initialize it from this class instead of
// the main() function.
Subprocess subprocess_;
diff --git a/dbus_service.cc b/dbus_service.cc
index 235b9c2..2d426e4 100644
--- a/dbus_service.cc
+++ b/dbus_service.cc
@@ -22,9 +22,9 @@
#include <base/location.h>
#include <base/logging.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/bind_lambda.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/strings/string_utils.h>
+#include <brillo/bind_lambda.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/strings/string_utils.h>
#include <policy/device_policy.h>
#include <update_engine/dbus-constants.h>
@@ -38,8 +38,8 @@
#include "update_engine/utils.h"
using base::StringPrintf;
-using chromeos::ErrorPtr;
-using chromeos::string_utils::ToString;
+using brillo::ErrorPtr;
+using brillo::string_utils::ToString;
using std::set;
using std::string;
using update_engine::AttemptUpdateFlags;
@@ -50,9 +50,9 @@
void LogAndSetError(ErrorPtr *error,
const tracked_objects::Location& location,
const string& reason) {
- chromeos::Error::AddTo(
+ brillo::Error::AddTo(
error, location,
- chromeos::errors::dbus::kDomain,
+ brillo::errors::dbus::kDomain,
update_engine::kUpdateEngineServiceErrorFailed, reason);
LOG(ERROR) << "Sending DBus Failure: " << location.ToString() << ": "
<< reason;
diff --git a/dbus_service.h b/dbus_service.h
index 444ae64..88bd90a 100644
--- a/dbus_service.h
+++ b/dbus_service.h
@@ -22,18 +22,12 @@
#include <string>
#include <base/memory/ref_counted.h>
-#include <chromeos/errors/error.h>
+#include <brillo/errors/error.h>
#include "update_engine/update_attempter.h"
#include "dbus_bindings/org.chromium.UpdateEngineInterface.h"
-namespace chromeos {
-namespace dbus {
-class Bus;
-} // namespace dbus
-} // namespace chromeos
-
namespace chromeos_update_engine {
class UpdateEngineService
@@ -43,29 +37,29 @@
virtual ~UpdateEngineService() = default;
// Implementation of org::chromium::UpdateEngineInterfaceInterface.
- bool AttemptUpdate(chromeos::ErrorPtr* error,
+ bool AttemptUpdate(brillo::ErrorPtr* error,
const std::string& in_app_version,
const std::string& in_omaha_url) override;
- bool AttemptUpdateWithFlags(chromeos::ErrorPtr* error,
+ bool AttemptUpdateWithFlags(brillo::ErrorPtr* error,
const std::string& in_app_version,
const std::string& in_omaha_url,
int32_t in_flags_as_int) override;
- bool AttemptRollback(chromeos::ErrorPtr* error, bool in_powerwash) override;
+ bool AttemptRollback(brillo::ErrorPtr* error, bool in_powerwash) override;
// Checks if the system rollback is available by verifying if the secondary
// system partition is valid and bootable.
- bool CanRollback(chromeos::ErrorPtr* error, bool* out_can_rollback) override;
+ bool CanRollback(brillo::ErrorPtr* error, bool* out_can_rollback) override;
// Resets the status of the update_engine to idle, ignoring any applied
// update. This is used for development only.
- bool ResetStatus(chromeos::ErrorPtr* error) override;
+ bool ResetStatus(brillo::ErrorPtr* error) override;
// Returns the current status of the Update Engine. If an update is in
// progress, the number of operations, size to download and overall progress
// is reported.
- bool GetStatus(chromeos::ErrorPtr* error,
+ bool GetStatus(brillo::ErrorPtr* error,
int64_t* out_last_checked_time,
double* out_progress,
std::string* out_current_operation,
@@ -73,7 +67,7 @@
int64_t* out_new_size) override;
// Reboots the device if an update is applied and a reboot is required.
- bool RebootIfNeeded(chromeos::ErrorPtr* error) override;
+ bool RebootIfNeeded(brillo::ErrorPtr* error) override;
// Changes the current channel of the device to the target channel. If the
// target channel is a less stable channel than the current channel, then the
@@ -83,7 +77,7 @@
// if required. Otherwise, the change takes effect eventually (when the
// version on the target channel goes above the version number of what the
// device currently has).
- bool SetChannel(chromeos::ErrorPtr* error,
+ bool SetChannel(brillo::ErrorPtr* error,
const std::string& in_target_channel,
bool in_is_powerwash_allowed) override;
@@ -91,46 +85,46 @@
// the channel that the device is currently on. Otherwise, it populates it
// with the name of the channel the device is supposed to be (in case of a
// pending channel change).
- bool GetChannel(chromeos::ErrorPtr* error,
+ bool GetChannel(brillo::ErrorPtr* error,
bool in_get_current_channel,
std::string* out_channel) override;
// Enables or disables the sharing and consuming updates over P2P feature
// according to the |enabled| argument passed.
- bool SetP2PUpdatePermission(chromeos::ErrorPtr* error,
+ bool SetP2PUpdatePermission(brillo::ErrorPtr* error,
bool in_enabled) override;
// Returns the current value for the P2P enabled setting. This involves both
// sharing and consuming updates over P2P.
- bool GetP2PUpdatePermission(chromeos::ErrorPtr* error,
+ bool GetP2PUpdatePermission(brillo::ErrorPtr* error,
bool* out_enabled) override;
// If there's no device policy installed, sets the update over cellular
// networks permission to the |allowed| value. Otherwise, this method returns
// with an error since this setting is overridden by the applied policy.
- bool SetUpdateOverCellularPermission(chromeos::ErrorPtr* error,
+ bool SetUpdateOverCellularPermission(brillo::ErrorPtr* error,
bool in_allowed) override;
// Returns the current value of the update over cellular network setting,
// either forced by the device policy if the device is enrolled or the current
// user preference otherwise.
- bool GetUpdateOverCellularPermission(chromeos::ErrorPtr* error,
+ bool GetUpdateOverCellularPermission(brillo::ErrorPtr* error,
bool* out_allowed) override;
// Returns the duration since the last successful update, as the
// duration on the wallclock. Returns an error if the device has not
// updated.
- bool GetDurationSinceUpdate(chromeos::ErrorPtr* error,
+ bool GetDurationSinceUpdate(brillo::ErrorPtr* error,
int64_t* out_usec_wallclock) override;
// Returns the version string of OS that was used before the last reboot
// into an updated version. This is available only when rebooting into an
// update from previous version, otherwise an empty string is returned.
- bool GetPrevVersion(chromeos::ErrorPtr* error,
+ bool GetPrevVersion(brillo::ErrorPtr* error,
std::string* out_prev_version) override;
// Returns the name of kernel partition that can be rolled back into.
- bool GetRollbackPartition(chromeos::ErrorPtr* error,
+ bool GetRollbackPartition(brillo::ErrorPtr* error,
std::string* out_rollback_partition_name) override;
private:
@@ -158,7 +152,7 @@
private:
scoped_refptr<dbus::Bus> bus_;
UpdateEngineService dbus_service_;
- chromeos::dbus_utils::DBusObject dbus_object_;
+ brillo::dbus_utils::DBusObject dbus_object_;
};
} // namespace chromeos_update_engine
diff --git a/dbus_service_unittest.cc b/dbus_service_unittest.cc
index 824ea71..4ea7eec 100644
--- a/dbus_service_unittest.cc
+++ b/dbus_service_unittest.cc
@@ -19,14 +19,14 @@
#include <gtest/gtest.h>
#include <string>
-#include <chromeos/errors/error.h>
+#include <brillo/errors/error.h>
#include <policy/libpolicy.h>
#include <policy/mock_device_policy.h>
#include <update_engine/dbus-constants.h>
#include "update_engine/fake_system_state.h"
-using chromeos::errors::dbus::kDomain;
+using brillo::errors::dbus::kDomain;
using std::string;
using testing::Return;
using testing::SetArgumentPointee;
@@ -52,7 +52,7 @@
// Shortcut for fake_system_state_.mock_update_attempter().
MockUpdateAttempter* mock_update_attempter_;
- chromeos::ErrorPtr error_;
+ brillo::ErrorPtr error_;
UpdateEngineService dbus_service_;
};
diff --git a/dbus_test_utils.h b/dbus_test_utils.h
index f5ae30d..b3748ce 100644
--- a/dbus_test_utils.h
+++ b/dbus_test_utils.h
@@ -21,7 +21,7 @@
#include <string>
#include <base/bind.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include <gmock/gmock.h>
namespace chromeos_update_engine {
@@ -41,8 +41,8 @@
public:
MockSignalHandler() = default;
~MockSignalHandler() {
- if (callback_connected_task_ != chromeos::MessageLoop::kTaskIdNull)
- chromeos::MessageLoop::current()->CancelTask(callback_connected_task_);
+ if (callback_connected_task_ != brillo::MessageLoop::kTaskIdNull)
+ brillo::MessageLoop::current()->CancelTask(callback_connected_task_);
}
// Returns whether the signal handler is registered.
@@ -57,7 +57,7 @@
on_connected_callback_.reset(
new dbus::ObjectProxy::OnConnectedCallback(on_connected_callback));
// Notify from the main loop that the callback was connected.
- callback_connected_task_ = chromeos::MessageLoop::current()->PostTask(
+ callback_connected_task_ = brillo::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&MockSignalHandler<T>::OnCallbackConnected,
base::Unretained(this)));
@@ -65,12 +65,12 @@
private:
void OnCallbackConnected() {
- callback_connected_task_ = chromeos::MessageLoop::kTaskIdNull;
+ callback_connected_task_ = brillo::MessageLoop::kTaskIdNull;
on_connected_callback_->Run("", "", true);
}
- chromeos::MessageLoop::TaskId callback_connected_task_{
- chromeos::MessageLoop::kTaskIdNull};
+ brillo::MessageLoop::TaskId callback_connected_task_{
+ brillo::MessageLoop::kTaskIdNull};
std::unique_ptr<base::Callback<T>> signal_callback_;
std::unique_ptr<dbus::ObjectProxy::OnConnectedCallback>
diff --git a/delta_performer.cc b/delta_performer.cc
index df128f3..4d08c82 100644
--- a/delta_performer.cc
+++ b/delta_performer.cc
@@ -30,8 +30,8 @@
#include <base/format_macros.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/data_encoding.h>
-#include <chromeos/make_unique_ptr.h>
+#include <brillo/data_encoding.h>
+#include <brillo/make_unique_ptr.h>
#include <google/protobuf/repeated_field.h>
#include "update_engine/bzip_extent_writer.h"
@@ -320,7 +320,7 @@
namespace {
void LogPartitionInfoHash(const PartitionInfo& info, const string& tag) {
- string sha256 = chromeos::data_encoding::Base64Encode(info.hash());
+ string sha256 = brillo::data_encoding::Base64Encode(info.hash());
LOG(INFO) << "PartitionInfo " << tag << " sha256: " << sha256
<< " size: " << info.size();
}
@@ -391,7 +391,7 @@
}
DeltaPerformer::MetadataParseResult DeltaPerformer::ParsePayloadMetadata(
- const chromeos::Blob& payload, ErrorCode* error) {
+ const brillo::Blob& payload, ErrorCode* error) {
*error = ErrorCode::kSuccess;
uint64_t manifest_offset;
@@ -813,8 +813,8 @@
// Setup the ExtentWriter stack based on the operation type.
std::unique_ptr<ExtentWriter> writer =
- chromeos::make_unique_ptr(new ZeroPadExtentWriter(
- chromeos::make_unique_ptr(new DirectExtentWriter())));
+ brillo::make_unique_ptr(new ZeroPadExtentWriter(
+ brillo::make_unique_ptr(new DirectExtentWriter())));
if (operation.type() == InstallOperation::REPLACE_BZ) {
writer.reset(new BzipExtentWriter(std::move(writer)));
@@ -850,7 +850,7 @@
(operation.type() == InstallOperation::ZERO ? BLKZEROOUT : BLKDISCARD);
bool attempt_ioctl = true;
- chromeos::Blob zeros;
+ brillo::Blob zeros;
for (int i = 0; i < operation.dst_extents_size(); i++) {
Extent extent = operation.dst_extents(i);
const uint64_t start = extent.start_block() * block_size_;
@@ -888,7 +888,7 @@
blocks_to_write += operation.dst_extents(i).num_blocks();
DCHECK_EQ(blocks_to_write, blocks_to_read);
- chromeos::Blob buf(blocks_to_write * block_size_);
+ brillo::Blob buf(blocks_to_write * block_size_);
// Read in bytes.
ssize_t bytes_read = 0;
@@ -966,7 +966,7 @@
DCHECK_EQ(src_blocks.size(), blocks_to_read);
DCHECK_EQ(src_blocks.size(), dst_blocks.size());
- chromeos::Blob buf(block_size_);
+ brillo::Blob buf(block_size_);
ssize_t bytes_read = 0;
// Read/write one block at a time.
for (uint64_t i = 0; i < blocks_to_read; i++) {
@@ -1070,7 +1070,7 @@
(last_extent.start_block() + last_extent.num_blocks()) * block_size_;
const uint64_t begin_byte =
end_byte - (block_size_ - operation.dst_length() % block_size_);
- chromeos::Blob zeros(end_byte - begin_byte);
+ brillo::Blob zeros(end_byte - begin_byte);
TEST_AND_RETURN_FALSE(
utils::PWriteAll(target_fd_, zeros.data(), end_byte - begin_byte, begin_byte));
}
@@ -1194,8 +1194,8 @@
}
// Convert base64-encoded signature to raw bytes.
- chromeos::Blob metadata_signature;
- if (!chromeos::data_encoding::Base64Decode(install_plan_->metadata_signature,
+ brillo::Blob metadata_signature;
+ if (!brillo::data_encoding::Base64Decode(install_plan_->metadata_signature,
&metadata_signature)) {
LOG(ERROR) << "Unable to decode base64 metadata signature: "
<< install_plan_->metadata_signature;
@@ -1214,7 +1214,7 @@
LOG(INFO) << "Verifying metadata hash signature using public key: "
<< path_to_public_key.value();
- chromeos::Blob expected_metadata_hash;
+ brillo::Blob expected_metadata_hash;
if (!PayloadVerifier::GetRawHashFromSignature(metadata_signature,
path_to_public_key.value(),
&expected_metadata_hash)) {
@@ -1229,7 +1229,7 @@
return ErrorCode::kDownloadMetadataSignatureVerificationError;
}
- chromeos::Blob calculated_metadata_hash = metadata_hasher.raw_hash();
+ brillo::Blob calculated_metadata_hash = metadata_hasher.raw_hash();
PayloadVerifier::PadRSA2048SHA256Hash(&calculated_metadata_hash);
if (calculated_metadata_hash.empty()) {
LOG(ERROR) << "Computed actual hash of metadata is empty.";
@@ -1328,7 +1328,7 @@
return ErrorCode::kSuccess;
}
- chromeos::Blob expected_op_hash;
+ brillo::Blob expected_op_hash;
expected_op_hash.assign(operation.data_sha256_hash().data(),
(operation.data_sha256_hash().data() +
operation.data_sha256_hash().size()));
@@ -1341,7 +1341,7 @@
return ErrorCode::kDownloadOperationHashVerificationError;
}
- chromeos::Blob calculated_op_hash = operation_hasher.raw_hash();
+ brillo::Blob calculated_op_hash = operation_hasher.raw_hash();
if (calculated_op_hash != expected_op_hash) {
LOG(ERROR) << "Hash verification failed for operation "
<< next_operation_num_ << ". Expected hash = ";
@@ -1403,7 +1403,7 @@
signed_hasher.SetContext(signed_hash_context_));
TEST_AND_RETURN_VAL(ErrorCode::kDownloadPayloadPubKeyVerificationError,
signed_hasher.Finalize());
- chromeos::Blob hash_data = signed_hasher.raw_hash();
+ brillo::Blob hash_data = signed_hasher.raw_hash();
TEST_AND_RETURN_VAL(ErrorCode::kDownloadPayloadPubKeyVerificationError,
PayloadVerifier::PadRSA2048SHA256Hash(&hash_data));
TEST_AND_RETURN_VAL(ErrorCode::kDownloadPayloadPubKeyVerificationError,
@@ -1454,7 +1454,7 @@
}
string StringForHashBytes(const void* bytes, size_t size) {
- return chromeos::data_encoding::Base64Encode(bytes, size);
+ return brillo::data_encoding::Base64Encode(bytes, size);
}
} // namespace
@@ -1512,7 +1512,7 @@
hash_calculator_.Update(buffer_.data(), buffer_.size());
// Swap content with an empty vector to ensure that all memory is released.
- chromeos::Blob().swap(buffer_);
+ brillo::Blob().swap(buffer_);
}
bool DeltaPerformer::CanResumeUpdate(PrefsInterface* prefs,
diff --git a/delta_performer.h b/delta_performer.h
index 64ad4af..4f9881c 100644
--- a/delta_performer.h
+++ b/delta_performer.h
@@ -23,7 +23,7 @@
#include <vector>
#include <base/time/time.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include <google/protobuf/repeated_field.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
@@ -147,7 +147,7 @@
// kMetadataParseInsufficientData if more data is needed to parse the complete
// metadata. Returns kMetadataParseError if the metadata can't be parsed given
// the payload.
- MetadataParseResult ParsePayloadMetadata(const chromeos::Blob& payload,
+ MetadataParseResult ParsePayloadMetadata(const brillo::Blob& payload,
ErrorCode* error);
void set_public_key_path(const std::string& public_key_path) {
@@ -331,7 +331,7 @@
// A buffer used for accumulating downloaded data. Initially, it stores the
// payload metadata; once that's downloaded and parsed, it stores data for the
// next update operation.
- chromeos::Blob buffer_;
+ brillo::Blob buffer_;
// Offset of buffer_ in the binary blobs section of the update.
uint64_t buffer_offset_{0};
@@ -348,7 +348,7 @@
std::string signed_hash_context_;
// Signatures message blob extracted directly from the payload.
- chromeos::Blob signatures_message_data_;
+ brillo::Blob signatures_message_data_;
// The public key to be used. Provided as a member so that tests can
// override with test keys.
diff --git a/delta_performer_integration_test.cc b/delta_performer_integration_test.cc
index 036b7c1..704e4cd 100644
--- a/delta_performer_integration_test.cc
+++ b/delta_performer_integration_test.cc
@@ -72,13 +72,13 @@
uint64_t metadata_size;
string old_kernel;
- chromeos::Blob old_kernel_data;
+ brillo::Blob old_kernel_data;
string new_kernel;
- chromeos::Blob new_kernel_data;
+ brillo::Blob new_kernel_data;
string result_kernel;
- chromeos::Blob result_kernel_data;
+ brillo::Blob result_kernel_data;
size_t kernel_size;
// The InstallPlan referenced by the DeltaPerformer. This needs to outlive
@@ -86,7 +86,7 @@
InstallPlan install_plan;
// The in-memory copy of delta file.
- chromeos::Blob delta;
+ brillo::Blob delta;
// The mock system state object with which we initialize the
// delta performer.
@@ -124,7 +124,7 @@
size_t image_size) {
EXPECT_EQ(0, image_size % kBlockSize);
- chromeos::Blob a_data, b_data;
+ brillo::Blob a_data, b_data;
EXPECT_TRUE(utils::ReadFile(a_file, &a_data)) << "file failed: " << a_file;
EXPECT_TRUE(utils::ReadFile(b_file, &b_data)) << "file failed: " << b_file;
@@ -132,8 +132,8 @@
EXPECT_GE(b_data.size(), image_size);
for (size_t i = 0; i < image_size; i += kBlockSize) {
EXPECT_EQ(0, i % kBlockSize);
- chromeos::Blob a_sub(&a_data[i], &a_data[i + kBlockSize]);
- chromeos::Blob b_sub(&b_data[i], &b_data[i + kBlockSize]);
+ brillo::Blob a_sub(&a_data[i], &a_data[i + kBlockSize]);
+ brillo::Blob b_sub(&b_data[i], &b_data[i + kBlockSize]);
EXPECT_TRUE(a_sub == b_sub) << "Block " << (i/kBlockSize) << " differs";
}
if (::testing::Test::HasNonfatalFailure()) {
@@ -155,10 +155,10 @@
}
static size_t GetSignatureSize(const string& private_key_path) {
- const chromeos::Blob data(1, 'x');
- chromeos::Blob hash;
+ const brillo::Blob data(1, 'x');
+ brillo::Blob hash;
EXPECT_TRUE(OmahaHashCalculator::RawHashOfData(data, &hash));
- chromeos::Blob signature;
+ brillo::Blob signature;
EXPECT_TRUE(PayloadSigner::SignHash(hash,
private_key_path,
&signature));
@@ -168,8 +168,8 @@
static bool InsertSignaturePlaceholder(int signature_size,
const string& payload_path,
uint64_t* out_metadata_size) {
- vector<chromeos::Blob> signatures;
- signatures.push_back(chromeos::Blob(signature_size, 0));
+ vector<brillo::Blob> signatures;
+ signatures.push_back(brillo::Blob(signature_size, 0));
return PayloadSigner::AddSignatureToPayload(
payload_path,
@@ -181,18 +181,18 @@
static void SignGeneratedPayload(const string& payload_path,
uint64_t* out_metadata_size) {
int signature_size = GetSignatureSize(kUnittestPrivateKeyPath);
- chromeos::Blob hash;
+ brillo::Blob hash;
ASSERT_TRUE(PayloadSigner::HashPayloadForSigning(
payload_path,
vector<int>(1, signature_size),
&hash));
- chromeos::Blob signature;
+ brillo::Blob signature;
ASSERT_TRUE(PayloadSigner::SignHash(hash,
kUnittestPrivateKeyPath,
&signature));
ASSERT_TRUE(PayloadSigner::AddSignatureToPayload(
payload_path,
- vector<chromeos::Blob>(1, signature),
+ vector<brillo::Blob>(1, signature),
payload_path,
out_metadata_size));
EXPECT_TRUE(PayloadVerifier::VerifySignedPayload(
@@ -241,7 +241,7 @@
hash_file.c_str())));
// Pad the hash
- chromeos::Blob hash;
+ brillo::Blob hash;
ASSERT_TRUE(utils::ReadFile(hash_file, &hash));
ASSERT_TRUE(PayloadVerifier::PadRSA2048SHA256Hash(&hash));
ASSERT_TRUE(test_utils::WriteFileVector(hash_file, hash));
@@ -334,7 +334,7 @@
string a_mnt;
ScopedLoopMounter b_mounter(state->a_img, &a_mnt, 0);
- chromeos::Blob hardtocompress;
+ brillo::Blob hardtocompress;
while (hardtocompress.size() < 3 * kBlockSize) {
hardtocompress.insert(hardtocompress.end(),
std::begin(kRandomString), std::end(kRandomString));
@@ -344,7 +344,7 @@
hardtocompress.data(),
hardtocompress.size()));
- chromeos::Blob zeros(16 * 1024, 0);
+ brillo::Blob zeros(16 * 1024, 0);
EXPECT_EQ(zeros.size(),
base::WriteFile(base::FilePath(base::StringPrintf(
"%s/move-to-sparse", a_mnt.c_str())),
@@ -362,7 +362,7 @@
// Write 1 MiB of 0xff to try to catch the case where writing a bsdiff
// patch fails to zero out the final block.
- chromeos::Blob ones(1024 * 1024, 0xff);
+ brillo::Blob ones(1024 * 1024, 0xff);
EXPECT_TRUE(utils::WriteFile(base::StringPrintf("%s/ones",
a_mnt.c_str()).c_str(),
ones.data(),
@@ -376,7 +376,7 @@
} else {
if (minor_version == kSourceMinorPayloadVersion) {
// Create a result image with image_size bytes of garbage.
- chromeos::Blob ones(state->image_size, 0xff);
+ brillo::Blob ones(state->image_size, 0xff);
EXPECT_TRUE(utils::WriteFile(state->result_img.c_str(),
ones.data(),
ones.size()));
@@ -410,7 +410,7 @@
WriteSparseFile(base::StringPrintf("%s/move-to-sparse", b_mnt.c_str()),
16 * 1024));
- chromeos::Blob zeros(16 * 1024, 0);
+ brillo::Blob zeros(16 * 1024, 0);
EXPECT_EQ(zeros.size(),
base::WriteFile(base::FilePath(base::StringPrintf(
"%s/move-from-sparse", b_mnt.c_str())),
@@ -436,7 +436,7 @@
base::StringPrintf("rm %s/boguslink && echo foobar > %s/boguslink",
b_mnt.c_str(), b_mnt.c_str()).c_str()));
- chromeos::Blob hardtocompress;
+ brillo::Blob hardtocompress;
while (hardtocompress.size() < 3 * kBlockSize) {
hardtocompress.insert(hardtocompress.end(),
std::begin(kRandomString), std::end(kRandomString));
@@ -847,7 +847,7 @@
return;
}
- chromeos::Blob updated_kernel_partition;
+ brillo::Blob updated_kernel_partition;
if (minor_version == kSourceMinorPayloadVersion) {
CompareFilesByBlock(state->result_kernel, state->new_kernel,
state->kernel_size);
@@ -873,13 +873,13 @@
EXPECT_EQ(kLegacyPartitionNameKernel, partitions[1].name);
EXPECT_EQ(kDefaultKernelSize, partitions[1].target_size);
- chromeos::Blob expected_new_kernel_hash;
+ brillo::Blob expected_new_kernel_hash;
EXPECT_TRUE(OmahaHashCalculator::RawHashOfData(state->new_kernel_data,
&expected_new_kernel_hash));
EXPECT_EQ(expected_new_kernel_hash, partitions[1].target_hash);
EXPECT_EQ(state->image_size, partitions[0].target_size);
- chromeos::Blob expected_new_rootfs_hash;
+ brillo::Blob expected_new_rootfs_hash;
EXPECT_EQ(state->image_size,
OmahaHashCalculator::RawHashOfFile(state->b_img,
state->image_size,
diff --git a/delta_performer_unittest.cc b/delta_performer_unittest.cc
index fa0692f..b177790 100644
--- a/delta_performer_unittest.cc
+++ b/delta_performer_unittest.cc
@@ -102,10 +102,10 @@
EXPECT_EQ(expected, performer_.ValidateManifest());
}
- chromeos::Blob GeneratePayload(const chromeos::Blob& blob_data,
- const vector<AnnotatedOperation>& aops,
- bool sign_payload,
- int32_t minor_version) {
+ brillo::Blob GeneratePayload(const brillo::Blob& blob_data,
+ const vector<AnnotatedOperation>& aops,
+ bool sign_payload,
+ int32_t minor_version) {
string blob_path;
EXPECT_TRUE(utils::MakeTempFile("Blob-XXXXXX", &blob_path, nullptr));
ScopedPathUnlinker blob_unlinker(blob_path);
@@ -140,24 +140,24 @@
sign_payload ? kUnittestPrivateKeyPath : "",
&install_plan_.metadata_size));
- chromeos::Blob payload_data;
+ brillo::Blob payload_data;
EXPECT_TRUE(utils::ReadFile(payload_path, &payload_data));
return payload_data;
}
// Apply |payload_data| on partition specified in |source_path|.
- chromeos::Blob ApplyPayload(const chromeos::Blob& payload_data,
- const string& source_path) {
- return ApplyPayloadToData(payload_data, source_path, chromeos::Blob());
+ brillo::Blob ApplyPayload(const brillo::Blob& payload_data,
+ const string& source_path) {
+ return ApplyPayloadToData(payload_data, source_path, brillo::Blob());
}
// Apply the payload provided in |payload_data| reading from the |source_path|
// file and writing the contents to a new partition. The existing data in the
// new target file are set to |target_data| before applying the payload.
// Returns the result of the payload application.
- chromeos::Blob ApplyPayloadToData(const chromeos::Blob& payload_data,
- const string& source_path,
- const chromeos::Blob& target_data) {
+ brillo::Blob ApplyPayloadToData(const brillo::Blob& payload_data,
+ const string& source_path,
+ const brillo::Blob& target_data) {
string new_part;
EXPECT_TRUE(utils::MakeTempFile("Partition-XXXXXX", &new_part, nullptr));
ScopedPathUnlinker partition_unlinker(new_part);
@@ -178,7 +178,7 @@
EXPECT_TRUE(performer_.Write(payload_data.data(), payload_data.size()));
EXPECT_EQ(0, performer_.Close());
- chromeos::Blob partition_data;
+ brillo::Blob partition_data;
EXPECT_TRUE(utils::ReadFile(new_part, &partition_data));
return partition_data;
}
@@ -222,7 +222,7 @@
bool hash_checks_mandatory) {
// Loads the payload and parses the manifest.
- chromeos::Blob payload = GeneratePayload(chromeos::Blob(),
+ brillo::Blob payload = GeneratePayload(brillo::Blob(),
vector<AnnotatedOperation>(), sign_payload,
kFullPayloadMinorVersion);
@@ -298,8 +298,8 @@
TEST_F(DeltaPerformerTest, FullPayloadWriteTest) {
install_plan_.is_full_update = true;
- chromeos::Blob expected_data = chromeos::Blob(std::begin(kRandomString),
- std::end(kRandomString));
+ brillo::Blob expected_data = brillo::Blob(std::begin(kRandomString),
+ std::end(kRandomString));
expected_data.resize(4096); // block size
vector<AnnotatedOperation> aops;
AnnotatedOperation aop;
@@ -309,15 +309,15 @@
aop.op.set_type(InstallOperation::REPLACE);
aops.push_back(aop);
- chromeos::Blob payload_data = GeneratePayload(expected_data, aops, false,
+ brillo::Blob payload_data = GeneratePayload(expected_data, aops, false,
kFullPayloadMinorVersion);
EXPECT_EQ(expected_data, ApplyPayload(payload_data, "/dev/null"));
}
TEST_F(DeltaPerformerTest, ReplaceOperationTest) {
- chromeos::Blob expected_data = chromeos::Blob(std::begin(kRandomString),
- std::end(kRandomString));
+ brillo::Blob expected_data = brillo::Blob(std::begin(kRandomString),
+ std::end(kRandomString));
expected_data.resize(4096); // block size
vector<AnnotatedOperation> aops;
AnnotatedOperation aop;
@@ -327,17 +327,17 @@
aop.op.set_type(InstallOperation::REPLACE);
aops.push_back(aop);
- chromeos::Blob payload_data = GeneratePayload(expected_data, aops, false,
- kSourceMinorPayloadVersion);
+ brillo::Blob payload_data = GeneratePayload(expected_data, aops, false,
+ kSourceMinorPayloadVersion);
EXPECT_EQ(expected_data, ApplyPayload(payload_data, "/dev/null"));
}
TEST_F(DeltaPerformerTest, ReplaceBzOperationTest) {
- chromeos::Blob expected_data = chromeos::Blob(std::begin(kRandomString),
- std::end(kRandomString));
+ brillo::Blob expected_data = brillo::Blob(std::begin(kRandomString),
+ std::end(kRandomString));
expected_data.resize(4096); // block size
- chromeos::Blob bz_data;
+ brillo::Blob bz_data;
EXPECT_TRUE(BzipCompress(expected_data, &bz_data));
vector<AnnotatedOperation> aops;
@@ -348,18 +348,18 @@
aop.op.set_type(InstallOperation::REPLACE_BZ);
aops.push_back(aop);
- chromeos::Blob payload_data = GeneratePayload(bz_data, aops, false,
- kSourceMinorPayloadVersion);
+ brillo::Blob payload_data = GeneratePayload(bz_data, aops, false,
+ kSourceMinorPayloadVersion);
EXPECT_EQ(expected_data, ApplyPayload(payload_data, "/dev/null"));
}
TEST_F(DeltaPerformerTest, ReplaceXzOperationTest) {
- chromeos::Blob xz_data(std::begin(kXzCompressedData),
+ brillo::Blob xz_data(std::begin(kXzCompressedData),
std::end(kXzCompressedData));
// The compressed xz data contains only a single "a", but the operation should
// pad the rest of the two blocks with zeros.
- chromeos::Blob expected_data = chromeos::Blob(4096, 0);
+ brillo::Blob expected_data = brillo::Blob(4096, 0);
expected_data[0] = 'a';
AnnotatedOperation aop;
@@ -369,15 +369,15 @@
aop.op.set_type(InstallOperation::REPLACE_XZ);
vector<AnnotatedOperation> aops = {aop};
- chromeos::Blob payload_data = GeneratePayload(xz_data, aops, false,
- kSourceMinorPayloadVersion);
+ brillo::Blob payload_data = GeneratePayload(xz_data, aops, false,
+ kSourceMinorPayloadVersion);
EXPECT_EQ(expected_data, ApplyPayload(payload_data, "/dev/null"));
}
TEST_F(DeltaPerformerTest, ZeroOperationTest) {
- chromeos::Blob existing_data = chromeos::Blob(4096 * 10, 'a');
- chromeos::Blob expected_data = existing_data;
+ brillo::Blob existing_data = brillo::Blob(4096 * 10, 'a');
+ brillo::Blob expected_data = existing_data;
// Blocks 4, 5 and 7 should have zeros instead of 'a' after the operation is
// applied.
std::fill(expected_data.data() + 4096 * 4, expected_data.data() + 4096 * 6,
@@ -391,16 +391,16 @@
aop.op.set_type(InstallOperation::ZERO);
vector<AnnotatedOperation> aops = {aop};
- chromeos::Blob payload_data = GeneratePayload(chromeos::Blob(), aops, false,
- kSourceMinorPayloadVersion);
+ brillo::Blob payload_data = GeneratePayload(brillo::Blob(), aops, false,
+ kSourceMinorPayloadVersion);
EXPECT_EQ(expected_data,
ApplyPayloadToData(payload_data, "/dev/null", existing_data));
}
TEST_F(DeltaPerformerTest, SourceCopyOperationTest) {
- chromeos::Blob expected_data = chromeos::Blob(std::begin(kRandomString),
- std::end(kRandomString));
+ brillo::Blob expected_data = brillo::Blob(std::begin(kRandomString),
+ std::end(kRandomString));
expected_data.resize(4096); // block size
vector<AnnotatedOperation> aops;
AnnotatedOperation aop;
@@ -409,8 +409,8 @@
aop.op.set_type(InstallOperation::SOURCE_COPY);
aops.push_back(aop);
- chromeos::Blob payload_data = GeneratePayload(chromeos::Blob(), aops, false,
- kSourceMinorPayloadVersion);
+ brillo::Blob payload_data = GeneratePayload(brillo::Blob(), aops, false,
+ kSourceMinorPayloadVersion);
string source_path;
EXPECT_TRUE(utils::MakeTempFile("Source-XXXXXX",
&source_path, nullptr));
@@ -680,7 +680,7 @@
// Test that the versions in update_engine.conf that is installed to the
// image match the supported delta versions in the update engine.
uint32_t minor_version;
- chromeos::KeyValueStore store;
+ brillo::KeyValueStore store;
EXPECT_TRUE(store.Load(base::FilePath("update_engine.conf")));
EXPECT_TRUE(utils::GetMinorVersion(store, &minor_version));
EXPECT_EQ(DeltaPerformer::kSupportedMinorPayloadVersion, minor_version);
diff --git a/download_action_unittest.cc b/download_action_unittest.cc
index e5f78d6..250d7cb 100644
--- a/download_action_unittest.cc
+++ b/download_action_unittest.cc
@@ -29,9 +29,9 @@
#include <base/files/file_util.h>
#include <base/location.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/bind_lambda.h>
-#include <chromeos/message_loops/fake_message_loop.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/bind_lambda.h>
+#include <brillo/message_loops/fake_message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include "update_engine/action_pipe.h"
#include "update_engine/fake_p2p_manager_configuration.h"
@@ -76,8 +76,8 @@
}
void ProcessingDone(const ActionProcessor* processor,
ErrorCode code) override {
- chromeos::MessageLoop::current()->BreakLoop();
- chromeos::Blob found_data;
+ brillo::MessageLoop::current()->BreakLoop();
+ brillo::Blob found_data;
ASSERT_TRUE(utils::ReadFile(path_, &found_data));
if (expected_code_ != ErrorCode::kDownloadWriteError) {
ASSERT_EQ(expected_data_.size(), found_data.size());
@@ -100,7 +100,7 @@
}
string path_;
- chromeos::Blob expected_data_;
+ brillo::Blob expected_data_;
bool processing_done_called_;
ErrorCode expected_code_;
};
@@ -129,10 +129,10 @@
http_fetcher->SetOffset(1);
}
-void TestWithData(const chromeos::Blob& data,
+void TestWithData(const brillo::Blob& data,
int fail_write,
bool use_download_delegate) {
- chromeos::FakeMessageLoop loop(nullptr);
+ brillo::FakeMessageLoop loop(nullptr);
loop.SetAsCurrent();
FakeSystemState fake_system_state;
@@ -189,7 +189,7 @@
if (fail_write > 0)
expected_code = ErrorCode::kDownloadWriteError;
DownloadActionTestProcessorDelegate delegate(expected_code);
- delegate.expected_data_ = chromeos::Blob(data.begin() + 1, data.end());
+ delegate.expected_data_ = brillo::Blob(data.begin() + 1, data.end());
delegate.path_ = output_temp_file.GetPath();
ActionProcessor processor;
processor.set_delegate(&delegate);
@@ -209,7 +209,7 @@
} // namespace
TEST(DownloadActionTest, SimpleTest) {
- chromeos::Blob small;
+ brillo::Blob small;
const char* foo = "foo";
small.insert(small.end(), foo, foo + strlen(foo));
TestWithData(small,
@@ -218,7 +218,7 @@
}
TEST(DownloadActionTest, LargeTest) {
- chromeos::Blob big(5 * kMockHttpFetcherChunkSize);
+ brillo::Blob big(5 * kMockHttpFetcherChunkSize);
char c = '0';
for (unsigned int i = 0; i < big.size(); i++) {
big[i] = c;
@@ -230,7 +230,7 @@
}
TEST(DownloadActionTest, FailWriteTest) {
- chromeos::Blob big(5 * kMockHttpFetcherChunkSize);
+ brillo::Blob big(5 * kMockHttpFetcherChunkSize);
char c = '0';
for (unsigned int i = 0; i < big.size(); i++) {
big[i] = c;
@@ -242,7 +242,7 @@
}
TEST(DownloadActionTest, NoDownloadDelegateTest) {
- chromeos::Blob small;
+ brillo::Blob small;
const char* foo = "foofoo";
small.insert(small.end(), foo, foo + strlen(foo));
TestWithData(small,
@@ -254,7 +254,7 @@
class TerminateEarlyTestProcessorDelegate : public ActionProcessorDelegate {
public:
void ProcessingStopped(const ActionProcessor* processor) {
- chromeos::MessageLoop::current()->BreakLoop();
+ brillo::MessageLoop::current()->BreakLoop();
}
};
@@ -265,10 +265,10 @@
}
void TestTerminateEarly(bool use_download_delegate) {
- chromeos::FakeMessageLoop loop(nullptr);
+ brillo::FakeMessageLoop loop(nullptr);
loop.SetAsCurrent();
- chromeos::Blob data(kMockHttpFetcherChunkSize +
+ brillo::Blob data(kMockHttpFetcherChunkSize +
kMockHttpFetcherChunkSize / 2);
memset(data.data(), 0, data.size());
@@ -364,14 +364,14 @@
class PassObjectOutTestProcessorDelegate : public ActionProcessorDelegate {
public:
void ProcessingDone(const ActionProcessor* processor, ErrorCode code) {
- chromeos::MessageLoop::current()->BreakLoop();
+ brillo::MessageLoop::current()->BreakLoop();
}
};
} // namespace
TEST(DownloadActionTest, PassObjectOutTest) {
- chromeos::FakeMessageLoop loop(nullptr);
+ brillo::FakeMessageLoop loop(nullptr);
loop.SetAsCurrent();
DirectFileWriter writer;
@@ -483,8 +483,8 @@
download_action_->SetTestFileWriter(&writer);
BondActions(&feeder_action, download_action_.get());
DownloadActionTestProcessorDelegate delegate(ErrorCode::kSuccess);
- delegate.expected_data_ = chromeos::Blob(data_.begin() + start_at_offset_,
- data_.end());
+ delegate.expected_data_ = brillo::Blob(data_.begin() + start_at_offset_,
+ data_.end());
delegate.path_ = output_temp_file.GetPath();
processor_.set_delegate(&delegate);
processor_.EnqueueAction(&feeder_action);
@@ -497,7 +497,7 @@
}
// Mainloop used to make StartDownload() synchronous.
- chromeos::FakeMessageLoop loop_{nullptr};
+ brillo::FakeMessageLoop loop_{nullptr};
// The DownloadAction instance under test.
unique_ptr<DownloadAction> download_action_;
diff --git a/extent_writer.h b/extent_writer.h
index 99b2c2f..83f40e0 100644
--- a/extent_writer.h
+++ b/extent_writer.h
@@ -20,7 +20,7 @@
#include <vector>
#include <base/logging.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/file_descriptor.h"
#include "update_engine/update_metadata.pb.h"
@@ -116,7 +116,7 @@
bool EndImpl() override {
if (bytes_written_mod_block_size_) {
const size_t write_size = block_size_ - bytes_written_mod_block_size_;
- chromeos::Blob zeros(write_size, 0);
+ brillo::Blob zeros(write_size, 0);
TEST_AND_RETURN_FALSE(underlying_extent_writer_->Write(zeros.data(),
write_size));
}
diff --git a/extent_writer_unittest.cc b/extent_writer_unittest.cc
index 0750ebc..cccf232 100644
--- a/extent_writer_unittest.cc
+++ b/extent_writer_unittest.cc
@@ -25,8 +25,8 @@
#include <string>
#include <vector>
-#include <chromeos/make_unique_ptr.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/make_unique_ptr.h>
+#include <brillo/secure_blob.h>
#include <gtest/gtest.h>
#include "update_engine/payload_constants.h"
@@ -88,10 +88,10 @@
EXPECT_EQ(kBlockSize + bytes.size(), utils::FileSize(path_));
- chromeos::Blob result_file;
+ brillo::Blob result_file;
EXPECT_TRUE(utils::ReadFile(path_, &result_file));
- chromeos::Blob expected_file(kBlockSize);
+ brillo::Blob expected_file(kBlockSize);
expected_file.insert(expected_file.end(),
bytes.data(), bytes.data() + bytes.size());
ExpectVectorsEq(expected_file, result_file);
@@ -136,7 +136,7 @@
extent.set_num_blocks(1);
extents.push_back(extent);
- chromeos::Blob data(kBlockSize * 3);
+ brillo::Blob data(kBlockSize * 3);
test_utils::FillWithData(&data);
DirectExtentWriter direct_writer;
@@ -155,10 +155,10 @@
EXPECT_EQ(data.size(), utils::FileSize(path_));
- chromeos::Blob result_file;
+ brillo::Blob result_file;
EXPECT_TRUE(utils::ReadFile(path_, &result_file));
- chromeos::Blob expected_file;
+ brillo::Blob expected_file;
expected_file.insert(expected_file.end(),
data.begin() + kBlockSize,
data.begin() + kBlockSize * 2);
@@ -187,11 +187,11 @@
extent.set_num_blocks(1);
extents.push_back(extent);
- chromeos::Blob data(kBlockSize * 2);
+ brillo::Blob data(kBlockSize * 2);
test_utils::FillWithData(&data);
ZeroPadExtentWriter zero_pad_writer(
- chromeos::make_unique_ptr(new DirectExtentWriter()));
+ brillo::make_unique_ptr(new DirectExtentWriter()));
EXPECT_TRUE(zero_pad_writer.Init(fd_, extents, kBlockSize));
size_t bytes_to_write = data.size();
@@ -204,10 +204,10 @@
EXPECT_EQ(data.size(), utils::FileSize(path_));
- chromeos::Blob result_file;
+ brillo::Blob result_file;
EXPECT_TRUE(utils::ReadFile(path_, &result_file));
- chromeos::Blob expected_file;
+ brillo::Blob expected_file;
expected_file.insert(expected_file.end(),
data.begin() + kBlockSize,
data.begin() + kBlockSize * 2);
@@ -235,7 +235,7 @@
const int block_count = 4;
const int on_disk_count = 2;
- chromeos::Blob data(17);
+ brillo::Blob data(17);
test_utils::FillWithData(&data);
DirectExtentWriter direct_writer;
@@ -253,13 +253,13 @@
// check file size, then data inside
ASSERT_EQ(2 * kBlockSize, utils::FileSize(path_));
- chromeos::Blob resultant_data;
+ brillo::Blob resultant_data;
EXPECT_TRUE(utils::ReadFile(path_, &resultant_data));
// Create expected data
- chromeos::Blob expected_data(on_disk_count * kBlockSize);
- chromeos::Blob big(block_count * kBlockSize);
- for (chromeos::Blob::size_type i = 0; i < big.size(); i++) {
+ brillo::Blob expected_data(on_disk_count * kBlockSize);
+ brillo::Blob big(block_count * kBlockSize);
+ for (brillo::Blob::size_type i = 0; i < big.size(); i++) {
big[i] = data[i % data.size()];
}
memcpy(&expected_data[kBlockSize], &big[0], kBlockSize);
diff --git a/fake_extent_writer.h b/fake_extent_writer.h
index a876893..65cd837 100644
--- a/fake_extent_writer.h
+++ b/fake_extent_writer.h
@@ -20,7 +20,7 @@
#include <memory>
#include <vector>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/extent_writer.h"
@@ -56,12 +56,12 @@
// Fake methods.
bool InitCalled() { return init_called_; }
bool EndCalled() { return end_called_; }
- chromeos::Blob WrittenData() { return written_data_; }
+ brillo::Blob WrittenData() { return written_data_; }
private:
bool init_called_{false};
bool end_called_{false};
- chromeos::Blob written_data_;
+ brillo::Blob written_data_;
DISALLOW_COPY_AND_ASSIGN(FakeExtentWriter);
};
diff --git a/fake_file_writer.h b/fake_file_writer.h
index 4776db8..452b9d2 100644
--- a/fake_file_writer.h
+++ b/fake_file_writer.h
@@ -20,7 +20,7 @@
#include <vector>
#include <base/macros.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/file_writer.h"
@@ -56,13 +56,13 @@
return 0;
}
- const chromeos::Blob& bytes() {
+ const brillo::Blob& bytes() {
return bytes_;
}
private:
// The internal store of all bytes that have been written
- chromeos::Blob bytes_;
+ brillo::Blob bytes_;
// These are just to ensure FileWriter methods are called properly.
bool was_opened_;
diff --git a/file_writer_unittest.cc b/file_writer_unittest.cc
index e366419..731b6f0 100644
--- a/file_writer_unittest.cc
+++ b/file_writer_unittest.cc
@@ -24,7 +24,7 @@
#include <vector>
#include <gtest/gtest.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/test_utils.h"
#include "update_engine/utils.h"
@@ -47,7 +47,7 @@
O_CREAT | O_LARGEFILE | O_TRUNC | O_WRONLY,
0644));
EXPECT_TRUE(file_writer.Write("test", 4));
- chromeos::Blob actual_data;
+ brillo::Blob actual_data;
EXPECT_TRUE(utils::ReadFile(path, &actual_data));
EXPECT_FALSE(memcmp("test", actual_data.data(), actual_data.size()));
diff --git a/filesystem_verifier_action.cc b/filesystem_verifier_action.cc
index 5ca80b1..9418d14 100644
--- a/filesystem_verifier_action.cc
+++ b/filesystem_verifier_action.cc
@@ -26,7 +26,7 @@
#include <string>
#include <base/bind.h>
-#include <chromeos/streams/file_stream.h>
+#include <brillo/streams/file_stream.h>
#include "update_engine/boot_control_interface.h"
#include "update_engine/payload_constants.h"
@@ -148,11 +148,11 @@
if (part_path.empty())
return Cleanup(ErrorCode::kFilesystemVerifierError);
- chromeos::ErrorPtr error;
- src_stream_ = chromeos::FileStream::Open(
+ brillo::ErrorPtr error;
+ src_stream_ = brillo::FileStream::Open(
base::FilePath(part_path),
- chromeos::Stream::AccessMode::READ,
- chromeos::FileStream::Disposition::OPEN_EXISTING,
+ brillo::Stream::AccessMode::READ,
+ brillo::FileStream::Disposition::OPEN_EXISTING,
&error);
if (!src_stream_) {
@@ -221,7 +221,7 @@
}
void FilesystemVerifierAction::OnReadErrorCallback(
- const chromeos::Error* error) {
+ const brillo::Error* error) {
// TODO(deymo): Transform the read-error into an specific ErrorCode.
LOG(ERROR) << "Asynchronous read failed.";
Cleanup(ErrorCode::kError);
diff --git a/filesystem_verifier_action.h b/filesystem_verifier_action.h
index bfcac43..ad9f13b 100644
--- a/filesystem_verifier_action.h
+++ b/filesystem_verifier_action.h
@@ -23,7 +23,7 @@
#include <string>
#include <vector>
-#include <chromeos/streams/stream.h>
+#include <brillo/streams/stream.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
#include "update_engine/action.h"
@@ -80,7 +80,7 @@
// Called from the main loop when a single read from |src_stream_| succeeds or
// fails, calling OnReadDoneCallback() and OnReadErrorCallback() respectively.
void OnReadDoneCallback(size_t bytes_read);
- void OnReadErrorCallback(const chromeos::Error* error);
+ void OnReadErrorCallback(const brillo::Error* error);
// When the read is done, finalize the hash checking of the current partition
// and continue checking the next one.
@@ -102,10 +102,10 @@
size_t partition_index_{0};
// If not null, the FileStream used to read from the device.
- chromeos::StreamPtr src_stream_;
+ brillo::StreamPtr src_stream_;
// Buffer for storing data we read.
- chromeos::Blob buffer_;
+ brillo::Blob buffer_;
bool read_done_{false}; // true if reached EOF on the input stream.
bool cancelled_{false}; // true if the action has been cancelled.
diff --git a/filesystem_verifier_action_unittest.cc b/filesystem_verifier_action_unittest.cc
index 96bcb72..6dc9816 100644
--- a/filesystem_verifier_action_unittest.cc
+++ b/filesystem_verifier_action_unittest.cc
@@ -26,9 +26,9 @@
#include <base/posix/eintr_wrapper.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/bind_lambda.h>
-#include <chromeos/message_loops/fake_message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/bind_lambda.h>
+#include <brillo/message_loops/fake_message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -38,7 +38,7 @@
#include "update_engine/test_utils.h"
#include "update_engine/utils.h"
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using std::set;
using std::string;
using std::vector;
@@ -52,7 +52,7 @@
}
void TearDown() override {
- EXPECT_EQ(0, chromeos::MessageLoopRunMaxIterations(&loop_, 1));
+ EXPECT_EQ(0, brillo::MessageLoopRunMaxIterations(&loop_, 1));
}
// Returns true iff test has completed successfully.
@@ -60,7 +60,7 @@
bool hash_fail,
VerifierMode verifier_mode);
- chromeos::FakeMessageLoop loop_{nullptr};
+ brillo::FakeMessageLoop loop_{nullptr};
FakeBootControl fake_boot_control_;
};
@@ -142,7 +142,7 @@
// Make random data for a.
const size_t kLoopFileSize = 10 * 1024 * 1024 + 512;
- chromeos::Blob a_loop_data(kLoopFileSize);
+ brillo::Blob a_loop_data(kLoopFileSize);
test_utils::FillWithData(&a_loop_data);
// Write data to disk
@@ -232,7 +232,7 @@
EXPECT_EQ(ErrorCode::kSuccess, delegate.code());
// Make sure everything in the out_image is there
- chromeos::Blob a_out;
+ brillo::Blob a_out;
if (!utils::ReadFile(a_dev, &a_out)) {
ADD_FAILURE();
return false;
diff --git a/hardware_android.cc b/hardware_android.cc
index 34f8c41..1b2cf1c 100644
--- a/hardware_android.cc
+++ b/hardware_android.cc
@@ -17,7 +17,7 @@
#include "update_engine/hardware_android.h"
#include <base/files/file_util.h>
-#include <chromeos/make_unique_ptr.h>
+#include <brillo/make_unique_ptr.h>
#include <cutils/properties.h>
#include "update_engine/hardware.h"
@@ -37,7 +37,7 @@
// Factory defined in hardware.h.
std::unique_ptr<HardwareInterface> CreateHardware() {
- return chromeos::make_unique_ptr(new HardwareAndroid());
+ return brillo::make_unique_ptr(new HardwareAndroid());
}
} // namespace hardware
diff --git a/hardware_chromeos.cc b/hardware_chromeos.cc
index 2bd0de8..aac8ef2 100644
--- a/hardware_chromeos.cc
+++ b/hardware_chromeos.cc
@@ -20,7 +20,7 @@
#include <base/logging.h>
#include <base/strings/string_number_conversions.h>
#include <base/strings/string_util.h>
-#include <chromeos/make_unique_ptr.h>
+#include <brillo/make_unique_ptr.h>
#include <vboot/crossystem.h>
extern "C" {
@@ -61,7 +61,7 @@
// Factory defined in hardware.h.
std::unique_ptr<HardwareInterface> CreateHardware() {
- return chromeos::make_unique_ptr(new HardwareChromeOS());
+ return brillo::make_unique_ptr(new HardwareChromeOS());
}
} // namespace hardware
diff --git a/http_fetcher.cc b/http_fetcher.cc
index dbfc145..cfe5f00 100644
--- a/http_fetcher.cc
+++ b/http_fetcher.cc
@@ -19,7 +19,7 @@
#include <base/bind.h>
using base::Closure;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using std::deque;
using std::string;
diff --git a/http_fetcher.h b/http_fetcher.h
index 269f40a..5ea5724 100644
--- a/http_fetcher.h
+++ b/http_fetcher.h
@@ -24,7 +24,7 @@
#include <base/callback.h>
#include <base/logging.h>
#include <base/macros.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include "update_engine/http_common.h"
#include "update_engine/proxy_resolver.h"
@@ -140,7 +140,7 @@
// POST data for the transfer, and whether or not it was ever set
bool post_data_set_;
- chromeos::Blob post_data_;
+ brillo::Blob post_data_;
HttpContentType post_content_type_;
// The server's HTTP response code from the last transfer. This
@@ -157,8 +157,8 @@
ProxyResolver* const proxy_resolver_;
// The ID of the idle callback, used when we have no proxy resolver.
- chromeos::MessageLoop::TaskId no_resolver_idle_id_{
- chromeos::MessageLoop::kTaskIdNull};
+ brillo::MessageLoop::TaskId no_resolver_idle_id_{
+ brillo::MessageLoop::kTaskIdNull};
// Callback for when we are resolving proxies
std::unique_ptr<base::Closure> callback_;
diff --git a/http_fetcher_unittest.cc b/http_fetcher_unittest.cc
index f3a9c3e..df3444c 100644
--- a/http_fetcher_unittest.cc
+++ b/http_fetcher_unittest.cc
@@ -31,12 +31,12 @@
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
#include <base/time/time.h>
-#include <chromeos/message_loops/base_message_loop.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
-#include <chromeos/process.h>
-#include <chromeos/streams/file_stream.h>
-#include <chromeos/streams/stream.h>
+#include <brillo/message_loops/base_message_loop.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
+#include <brillo/process.h>
+#include <brillo/streams/file_stream.h>
+#include <brillo/streams/stream.h>
#include <gtest/gtest.h>
#include "update_engine/fake_system_state.h"
@@ -48,7 +48,7 @@
#include "update_engine/test_utils.h"
#include "update_engine/utils.h"
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using std::make_pair;
using std::pair;
using std::string;
@@ -109,7 +109,7 @@
started_ = false;
// Spawn the server process.
- unique_ptr<chromeos::Process> http_server(new chromeos::ProcessImpl());
+ unique_ptr<brillo::Process> http_server(new brillo::ProcessImpl());
base::FilePath test_server_path =
test_utils::GetBuildArtifactsPath().Append("test_http_server");
http_server->AddArg(test_server_path.value());
@@ -122,7 +122,7 @@
LOG(INFO) << "started http server with pid " << http_server->pid();
// Wait for server to begin accepting connections, obtain its port.
- chromeos::StreamPtr stdout = chromeos::FileStream::FromFileDescriptor(
+ brillo::StreamPtr stdout = brillo::FileStream::FromFileDescriptor(
http_server->GetPipe(STDOUT_FILENO), false /* own */, nullptr);
if (!stdout)
return;
@@ -176,7 +176,7 @@
private:
static const char* kServerListeningMsgPrefix;
- unique_ptr<chromeos::Process> http_server_;
+ unique_ptr<brillo::Process> http_server_;
unsigned int port_;
};
@@ -222,7 +222,7 @@
// Necessary to unhide the definition in the base class.
using AnyHttpFetcherTest::NewLargeFetcher;
HttpFetcher* NewLargeFetcher(size_t num_proxies) override {
- chromeos::Blob big_data(1000000);
+ brillo::Blob big_data(1000000);
CHECK_GT(num_proxies, 0u);
proxy_resolver_.set_num_proxies(num_proxies);
return new MockHttpFetcher(
@@ -340,7 +340,7 @@
class HttpFetcherTest : public ::testing::Test {
public:
base::MessageLoopForIO base_loop_;
- chromeos::BaseMessageLoop loop_{&base_loop_};
+ brillo::BaseMessageLoop loop_{&base_loop_};
T test_;
@@ -350,7 +350,7 @@
}
void TearDown() override {
- EXPECT_EQ(0, chromeos::MessageLoopRunMaxIterations(&loop_, 1));
+ EXPECT_EQ(0, brillo::MessageLoopRunMaxIterations(&loop_, 1));
}
private:
diff --git a/hwid_override.cc b/hwid_override.cc
index dd80721..f29444f 100644
--- a/hwid_override.cc
+++ b/hwid_override.cc
@@ -21,7 +21,7 @@
#include <base/files/file_path.h>
#include <base/files/file_util.h>
-#include <chromeos/key_value_store.h>
+#include <brillo/key_value_store.h>
using std::map;
using std::string;
@@ -35,7 +35,7 @@
HwidOverride::~HwidOverride() {}
string HwidOverride::Read(const base::FilePath& root) {
- chromeos::KeyValueStore lsb_release;
+ brillo::KeyValueStore lsb_release;
lsb_release.Load(base::FilePath(root.value() + "/etc/lsb-release"));
string result;
if (lsb_release.GetString(kHwidOverrideKey, &result))
diff --git a/include/debugd/dbus-proxies.h b/include/debugd/dbus-proxies.h
index 7bde80b..a528480 100644
--- a/include/debugd/dbus-proxies.h
+++ b/include/debugd/dbus-proxies.h
@@ -11,12 +11,12 @@
#include <base/logging.h>
#include <base/macros.h>
#include <base/memory/ref_counted.h>
-#include <chromeos/any.h>
-#include <chromeos/dbus/dbus_method_invoker.h>
-#include <chromeos/dbus/dbus_property.h>
-#include <chromeos/dbus/dbus_signal_handler.h>
-#include <chromeos/errors/error.h>
-#include <chromeos/variant_dictionary.h>
+#include <brillo/any.h>
+#include <brillo/dbus/dbus_method_invoker.h>
+#include <brillo/dbus/dbus_property.h>
+#include <brillo/dbus/dbus_signal_handler.h>
+#include <brillo/errors/error.h>
+#include <brillo/variant_dictionary.h>
#include <dbus/bus.h>
#include <dbus/message.h>
#include <dbus/object_manager.h>
@@ -38,9 +38,9 @@
virtual bool PingStart(
const dbus::FileDescriptor& in_outfd,
const std::string& in_destination,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
std::string* out_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Starts pinging the specified hostname with the specified options, with
@@ -50,22 +50,22 @@
virtual void PingStartAsync(
const dbus::FileDescriptor& in_outfd,
const std::string& in_destination,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
const base::Callback<void(const std::string& /*handle*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stops a running ping.
virtual bool PingStop(
const std::string& in_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stops a running ping.
virtual void PingStopAsync(
const std::string& in_handle,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Start system/kernel tracing. If tracing is already enabled it is
@@ -73,7 +73,7 @@
// must have been configured to support tracing.
virtual bool SystraceStart(
const std::string& in_categories,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Start system/kernel tracing. If tracing is already enabled it is
@@ -82,91 +82,91 @@
virtual void SystraceStartAsync(
const std::string& in_categories,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stop system/kernel tracing and write the collected event data.
virtual bool SystraceStop(
const dbus::FileDescriptor& in_outfd,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stop system/kernel tracing and write the collected event data.
virtual void SystraceStopAsync(
const dbus::FileDescriptor& in_outfd,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Return current status for system/kernel tracing including whether it
// is enabled, the tracing clock, and the set of events enabled.
virtual bool SystraceStatus(
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Return current status for system/kernel tracing including whether it
// is enabled, the tracing clock, and the set of events enabled.
virtual void SystraceStatusAsync(
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool TracePathStart(
const dbus::FileDescriptor& in_outfd,
const std::string& in_destination,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
std::string* out_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void TracePathStartAsync(
const dbus::FileDescriptor& in_outfd,
const std::string& in_destination,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
const base::Callback<void(const std::string& /*handle*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stops a running tracepath.
virtual bool TracePathStop(
const std::string& in_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stops a running tracepath.
virtual void TracePathStopAsync(
const std::string& in_handle,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns the routing table.
virtual bool GetRoutes(
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
std::vector<std::string>* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns the routing table.
virtual void GetRoutesAsync(
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
const base::Callback<void(const std::vector<std::string>& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns modem information as a JSON string. See the design document for
// a rationale.
virtual bool GetModemStatus(
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns modem information as a JSON string. See the design document for
// a rationale.
virtual void GetModemStatusAsync(
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Runs the specified command through the modem serial interface and
@@ -174,7 +174,7 @@
virtual bool RunModemCommand(
const std::string& in_command,
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Runs the specified command through the modem serial interface and
@@ -182,35 +182,35 @@
virtual void RunModemCommandAsync(
const std::string& in_command,
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns network information as a JSON string. See the design document
// for a rationale.
virtual bool GetNetworkStatus(
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns network information as a JSON string. See the design document
// for a rationale.
virtual void GetNetworkStatusAsync(
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns WiMAX information as a JSON string. See the design document for
// a rationale.
virtual bool GetWiMaxStatus(
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns WiMAX information as a JSON string. See the design document for
// a rationale.
virtual void GetWiMaxStatusAsync(
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Runs system-wide perf profiling. The profile parameters are selected by
@@ -221,7 +221,7 @@
int32_t* out_status,
std::vector<uint8_t>* out_perf_data,
std::vector<uint8_t>* out_perf_stat,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Runs system-wide perf profiling. The profile parameters are selected by
@@ -230,7 +230,7 @@
uint32_t in_duration_sec,
const std::vector<std::string>& in_perf_args,
const base::Callback<void(int32_t /*status*/, const std::vector<uint8_t>& /*perf_data*/, const std::vector<uint8_t>& /*perf_stat*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Runs system-wide perf profiling. It can can profile events other than
@@ -243,7 +243,7 @@
int32_t* out_status,
std::vector<uint8_t>* out_perf_data,
std::vector<uint8_t>* out_perf_stat,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Runs system-wide perf profiling. It can can profile events other than
@@ -254,7 +254,7 @@
virtual void GetRandomPerfOutputAsync(
uint32_t in_duration_sec,
const base::Callback<void(int32_t /*status*/, const std::vector<uint8_t>& /*perf_data*/, const std::vector<uint8_t>& /*perf_stat*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns perf event data. Does systemwide profiling. It can profile
@@ -265,7 +265,7 @@
virtual bool GetRichPerfData(
uint32_t in_duration_sec,
std::vector<uint8_t>* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns perf event data. Does systemwide profiling. It can profile
@@ -276,7 +276,7 @@
virtual void GetRichPerfDataAsync(
uint32_t in_duration_sec,
const base::Callback<void(const std::vector<uint8_t>& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// DEPRECATED: Use DumpDebugLogs instead.
@@ -284,7 +284,7 @@
// file descriptor.
virtual bool GetDebugLogs(
const dbus::FileDescriptor& in_outfd,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// DEPRECATED: Use DumpDebugLogs instead.
@@ -293,7 +293,7 @@
virtual void GetDebugLogsAsync(
const dbus::FileDescriptor& in_outfd,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Packages up system logs into a .tar(.gz) and returns it over the
@@ -301,7 +301,7 @@
virtual bool DumpDebugLogs(
bool in_is_compressed,
const dbus::FileDescriptor& in_outfd,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Packages up system logs into a .tar(.gz) and returns it over the
@@ -310,20 +310,20 @@
bool in_is_compressed,
const dbus::FileDescriptor& in_outfd,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Enables or disables debug mode for a specified subsystem.
virtual bool SetDebugMode(
const std::string& in_subsystem,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Enables or disables debug mode for a specified subsystem.
virtual void SetDebugModeAsync(
const std::string& in_subsystem,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Fetches the contents of a single system log, identified by name. See
@@ -331,7 +331,7 @@
virtual bool GetLog(
const std::string& in_log,
std::string* out_contents,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Fetches the contents of a single system log, identified by name. See
@@ -339,31 +339,31 @@
virtual void GetLogAsync(
const std::string& in_log,
const base::Callback<void(const std::string& /*contents*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns all the system logs.
virtual bool GetAllLogs(
std::map<std::string, std::string>* out_logs,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns all the system logs.
virtual void GetAllLogsAsync(
const base::Callback<void(const std::map<std::string, std::string>& /*logs*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns system logs for feedback reports.
virtual bool GetFeedbackLogs(
std::map<std::string, std::string>* out_logs,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns system logs for feedback reports.
virtual void GetFeedbackLogsAsync(
const base::Callback<void(const std::map<std::string, std::string>& /*logs*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns list of User log file names that Chrome itself must collect.
@@ -371,7 +371,7 @@
// collected separately for each user.
virtual bool GetUserLogFiles(
std::map<std::string, std::string>* out_user_log_files,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns list of User log file names that Chrome itself must collect.
@@ -379,45 +379,45 @@
// collected separately for each user.
virtual void GetUserLogFilesAsync(
const base::Callback<void(const std::map<std::string, std::string>& /*user_log_files*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Example method. See /doc/hacking.md.
virtual bool GetExample(
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Example method. See /doc/hacking.md.
virtual void GetExampleAsync(
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns information about network interfaces as a JSON string.
virtual bool GetInterfaces(
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Returns information about network interfaces as a JSON string.
virtual void GetInterfacesAsync(
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Tests ICMP connectivity to a specified host.
virtual bool TestICMP(
const std::string& in_host,
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Tests ICMP connectivity to a specified host.
virtual void TestICMPAsync(
const std::string& in_host,
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Tests ICMP connectivity to a specified host (with options).
@@ -425,7 +425,7 @@
const std::string& in_host,
const std::map<std::string, std::string>& in_options,
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Tests ICMP connectivity to a specified host (with options).
@@ -433,35 +433,35 @@
const std::string& in_host,
const std::map<std::string, std::string>& in_options,
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Runs BatteryFirmware utility.
virtual bool BatteryFirmware(
const std::string& in_option,
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Runs BatteryFirmware utility.
virtual void BatteryFirmwareAsync(
const std::string& in_option,
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Runs Smartctl utility.
virtual bool Smartctl(
const std::string& in_option,
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Runs Smartctl utility.
virtual void SmartctlAsync(
const std::string& in_option,
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Starts running memtester.
@@ -469,7 +469,7 @@
const dbus::FileDescriptor& in_outfd,
uint32_t in_memory,
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Starts running memtester.
@@ -477,47 +477,47 @@
const dbus::FileDescriptor& in_outfd,
uint32_t in_memory,
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stops running memtester.
virtual bool MemtesterStop(
const std::string& in_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stops running memtester.
virtual void MemtesterStopAsync(
const std::string& in_handle,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Starts running badblocks test.
virtual bool BadblocksStart(
const dbus::FileDescriptor& in_outfd,
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Starts running badblocks test.
virtual void BadblocksStartAsync(
const dbus::FileDescriptor& in_outfd,
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stops running badblocks.
virtual bool BadblocksStop(
const std::string& in_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stops running badblocks.
virtual void BadblocksStopAsync(
const std::string& in_handle,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Starts a packet capture with the specified options, with diagnostic
@@ -534,9 +534,9 @@
virtual bool PacketCaptureStart(
const dbus::FileDescriptor& in_statfd,
const dbus::FileDescriptor& in_outfd,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
std::string* out_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Starts a packet capture with the specified options, with diagnostic
@@ -553,70 +553,70 @@
virtual void PacketCaptureStartAsync(
const dbus::FileDescriptor& in_statfd,
const dbus::FileDescriptor& in_outfd,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
const base::Callback<void(const std::string& /*handle*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stops a running packet capture.
virtual bool PacketCaptureStop(
const std::string& in_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Stops a running packet capture.
virtual void PacketCaptureStopAsync(
const std::string& in_handle,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Triggers show-task-states(T) SysRq.
// See https://www.kernel.org/doc/Documentation/sysrq.txt.
virtual bool LogKernelTaskStates(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Triggers show-task-states(T) SysRq.
// See https://www.kernel.org/doc/Documentation/sysrq.txt.
virtual void LogKernelTaskStatesAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Triggers uploading of system crashes (the crash_sender program).
virtual bool UploadCrashes(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Triggers uploading of system crashes (the crash_sender program).
virtual void UploadCrashesAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Removes rootfs verification. Requires a system reboot before it will
// take effect. Restricted to pre-owner dev mode.
virtual bool RemoveRootfsVerification(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Removes rootfs verification. Requires a system reboot before it will
// take effect. Restricted to pre-owner dev mode.
virtual void RemoveRootfsVerificationAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Enables OS booting from a USB image. Restricted to pre-owner dev mode.
virtual bool EnableBootFromUsb(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Enables OS booting from a USB image. Restricted to pre-owner dev mode.
virtual void EnableBootFromUsbAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Sets up sshd to provide an SSH server immediately and on future reboots.
@@ -624,7 +624,7 @@
// that rootfs verification has been removed. Restricted to pre-owner dev
// mode.
virtual bool ConfigureSshServer(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Sets up sshd to provide an SSH server immediately and on future reboots.
@@ -633,7 +633,7 @@
// mode.
virtual void ConfigureSshServerAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Sets both the system and dev mode password for the indicated account.
@@ -641,7 +641,7 @@
virtual bool SetUserPassword(
const std::string& in_username,
const std::string& in_password,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Sets both the system and dev mode password for the indicated account.
@@ -650,7 +650,7 @@
const std::string& in_username,
const std::string& in_password,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Sets up Chrome for remote debugging. It will take effect after a reboot
@@ -658,7 +658,7 @@
// Requires that rootfs verification has been removed. Restricted to
// pre-owner dev mode.
virtual bool EnableChromeRemoteDebugging(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Sets up Chrome for remote debugging. It will take effect after a reboot
@@ -667,7 +667,7 @@
// pre-owner dev mode.
virtual void EnableChromeRemoteDebuggingAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Convenience function to enable a predefined set of tools from the Chrome
@@ -680,7 +680,7 @@
// further configuration or rollback. Restricted to pre-owner dev mode.
virtual bool EnableChromeDevFeatures(
const std::string& in_root_password,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Convenience function to enable a predefined set of tools from the Chrome
@@ -694,7 +694,7 @@
virtual void EnableChromeDevFeaturesAsync(
const std::string& in_root_password,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Queries which dev features have been enabled. Each dev feature will be
@@ -704,7 +704,7 @@
// set and the rest of the bits will always be set to 0.
virtual bool QueryDevFeatures(
int32_t* out_features,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Queries which dev features have been enabled. Each dev feature will be
@@ -714,29 +714,29 @@
// set and the rest of the bits will always be set to 0.
virtual void QueryDevFeaturesAsync(
const base::Callback<void(int32_t /*features*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Allow uploading of device coredump files.
virtual bool EnableDevCoredumpUpload(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Allow uploading of device coredump files.
virtual void EnableDevCoredumpUploadAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Disallow uploading of device coredump files.
virtual bool DisableDevCoredumpUpload(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// Disallow uploading of device coredump files.
virtual void DisableDevCoredumpUploadAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
};
@@ -777,11 +777,11 @@
bool PingStart(
const dbus::FileDescriptor& in_outfd,
const std::string& in_destination,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
std::string* out_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -790,7 +790,7 @@
in_outfd,
in_destination,
in_options);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_handle);
}
@@ -801,11 +801,11 @@
void PingStartAsync(
const dbus::FileDescriptor& in_outfd,
const std::string& in_destination,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
const base::Callback<void(const std::string& /*handle*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -820,16 +820,16 @@
// Stops a running ping.
bool PingStop(
const std::string& in_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"PingStop",
error,
in_handle);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -837,9 +837,9 @@
void PingStopAsync(
const std::string& in_handle,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -854,16 +854,16 @@
// must have been configured to support tracing.
bool SystraceStart(
const std::string& in_categories,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"SystraceStart",
error,
in_categories);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -873,9 +873,9 @@
void SystraceStartAsync(
const std::string& in_categories,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -888,16 +888,16 @@
// Stop system/kernel tracing and write the collected event data.
bool SystraceStop(
const dbus::FileDescriptor& in_outfd,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"SystraceStop",
error,
in_outfd);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -905,9 +905,9 @@
void SystraceStopAsync(
const dbus::FileDescriptor& in_outfd,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -921,15 +921,15 @@
// is enabled, the tracing clock, and the set of events enabled.
bool SystraceStatus(
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"SystraceStatus",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_status);
}
@@ -937,9 +937,9 @@
// is enabled, the tracing clock, and the set of events enabled.
void SystraceStatusAsync(
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -951,11 +951,11 @@
bool TracePathStart(
const dbus::FileDescriptor& in_outfd,
const std::string& in_destination,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
std::string* out_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -964,18 +964,18 @@
in_outfd,
in_destination,
in_options);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_handle);
}
void TracePathStartAsync(
const dbus::FileDescriptor& in_outfd,
const std::string& in_destination,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
const base::Callback<void(const std::string& /*handle*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -990,16 +990,16 @@
// Stops a running tracepath.
bool TracePathStop(
const std::string& in_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"TracePathStop",
error,
in_handle);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1007,9 +1007,9 @@
void TracePathStopAsync(
const std::string& in_handle,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1021,28 +1021,28 @@
// Returns the routing table.
bool GetRoutes(
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
std::vector<std::string>* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetRoutes",
error,
in_options);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_result);
}
// Returns the routing table.
void GetRoutesAsync(
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
const base::Callback<void(const std::vector<std::string>& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1056,15 +1056,15 @@
// a rationale.
bool GetModemStatus(
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetModemStatus",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_status);
}
@@ -1072,9 +1072,9 @@
// a rationale.
void GetModemStatusAsync(
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1088,16 +1088,16 @@
bool RunModemCommand(
const std::string& in_command,
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"RunModemCommand",
error,
in_command);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_status);
}
@@ -1106,9 +1106,9 @@
void RunModemCommandAsync(
const std::string& in_command,
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1122,15 +1122,15 @@
// for a rationale.
bool GetNetworkStatus(
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetNetworkStatus",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_status);
}
@@ -1138,9 +1138,9 @@
// for a rationale.
void GetNetworkStatusAsync(
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1153,15 +1153,15 @@
// a rationale.
bool GetWiMaxStatus(
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetWiMaxStatus",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_status);
}
@@ -1169,9 +1169,9 @@
// a rationale.
void GetWiMaxStatusAsync(
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1188,9 +1188,9 @@
int32_t* out_status,
std::vector<uint8_t>* out_perf_data,
std::vector<uint8_t>* out_perf_stat,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1198,7 +1198,7 @@
error,
in_duration_sec,
in_perf_args);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_status, out_perf_data, out_perf_stat);
}
@@ -1208,9 +1208,9 @@
uint32_t in_duration_sec,
const std::vector<std::string>& in_perf_args,
const base::Callback<void(int32_t /*status*/, const std::vector<uint8_t>& /*perf_data*/, const std::vector<uint8_t>& /*perf_stat*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1231,16 +1231,16 @@
int32_t* out_status,
std::vector<uint8_t>* out_perf_data,
std::vector<uint8_t>* out_perf_stat,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetRandomPerfOutput",
error,
in_duration_sec);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_status, out_perf_data, out_perf_stat);
}
@@ -1252,9 +1252,9 @@
void GetRandomPerfOutputAsync(
uint32_t in_duration_sec,
const base::Callback<void(int32_t /*status*/, const std::vector<uint8_t>& /*perf_data*/, const std::vector<uint8_t>& /*perf_stat*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1272,16 +1272,16 @@
bool GetRichPerfData(
uint32_t in_duration_sec,
std::vector<uint8_t>* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetRichPerfData",
error,
in_duration_sec);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_status);
}
@@ -1293,9 +1293,9 @@
void GetRichPerfDataAsync(
uint32_t in_duration_sec,
const base::Callback<void(const std::vector<uint8_t>& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1310,16 +1310,16 @@
// file descriptor.
bool GetDebugLogs(
const dbus::FileDescriptor& in_outfd,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetDebugLogs",
error,
in_outfd);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1329,9 +1329,9 @@
void GetDebugLogsAsync(
const dbus::FileDescriptor& in_outfd,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1346,9 +1346,9 @@
bool DumpDebugLogs(
bool in_is_compressed,
const dbus::FileDescriptor& in_outfd,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1356,7 +1356,7 @@
error,
in_is_compressed,
in_outfd);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1366,9 +1366,9 @@
bool in_is_compressed,
const dbus::FileDescriptor& in_outfd,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1382,16 +1382,16 @@
// Enables or disables debug mode for a specified subsystem.
bool SetDebugMode(
const std::string& in_subsystem,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"SetDebugMode",
error,
in_subsystem);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1399,9 +1399,9 @@
void SetDebugModeAsync(
const std::string& in_subsystem,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1416,16 +1416,16 @@
bool GetLog(
const std::string& in_log,
std::string* out_contents,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetLog",
error,
in_log);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_contents);
}
@@ -1434,9 +1434,9 @@
void GetLogAsync(
const std::string& in_log,
const base::Callback<void(const std::string& /*contents*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1449,24 +1449,24 @@
// Returns all the system logs.
bool GetAllLogs(
std::map<std::string, std::string>* out_logs,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetAllLogs",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_logs);
}
// Returns all the system logs.
void GetAllLogsAsync(
const base::Callback<void(const std::map<std::string, std::string>& /*logs*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1478,24 +1478,24 @@
// Returns system logs for feedback reports.
bool GetFeedbackLogs(
std::map<std::string, std::string>* out_logs,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetFeedbackLogs",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_logs);
}
// Returns system logs for feedback reports.
void GetFeedbackLogsAsync(
const base::Callback<void(const std::map<std::string, std::string>& /*logs*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1509,15 +1509,15 @@
// collected separately for each user.
bool GetUserLogFiles(
std::map<std::string, std::string>* out_user_log_files,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetUserLogFiles",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_user_log_files);
}
@@ -1526,9 +1526,9 @@
// collected separately for each user.
void GetUserLogFilesAsync(
const base::Callback<void(const std::map<std::string, std::string>& /*user_log_files*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1540,24 +1540,24 @@
// Example method. See /doc/hacking.md.
bool GetExample(
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetExample",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_result);
}
// Example method. See /doc/hacking.md.
void GetExampleAsync(
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1569,24 +1569,24 @@
// Returns information about network interfaces as a JSON string.
bool GetInterfaces(
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"GetInterfaces",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_result);
}
// Returns information about network interfaces as a JSON string.
void GetInterfacesAsync(
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1599,16 +1599,16 @@
bool TestICMP(
const std::string& in_host,
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"TestICMP",
error,
in_host);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_result);
}
@@ -1616,9 +1616,9 @@
void TestICMPAsync(
const std::string& in_host,
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1633,9 +1633,9 @@
const std::string& in_host,
const std::map<std::string, std::string>& in_options,
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1643,7 +1643,7 @@
error,
in_host,
in_options);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_result);
}
@@ -1652,9 +1652,9 @@
const std::string& in_host,
const std::map<std::string, std::string>& in_options,
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1669,16 +1669,16 @@
bool BatteryFirmware(
const std::string& in_option,
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"BatteryFirmware",
error,
in_option);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_result);
}
@@ -1686,9 +1686,9 @@
void BatteryFirmwareAsync(
const std::string& in_option,
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1702,16 +1702,16 @@
bool Smartctl(
const std::string& in_option,
std::string* out_result,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"Smartctl",
error,
in_option);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_result);
}
@@ -1719,9 +1719,9 @@
void SmartctlAsync(
const std::string& in_option,
const base::Callback<void(const std::string& /*result*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1736,9 +1736,9 @@
const dbus::FileDescriptor& in_outfd,
uint32_t in_memory,
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1746,7 +1746,7 @@
error,
in_outfd,
in_memory);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_status);
}
@@ -1755,9 +1755,9 @@
const dbus::FileDescriptor& in_outfd,
uint32_t in_memory,
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1771,16 +1771,16 @@
// Stops running memtester.
bool MemtesterStop(
const std::string& in_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"MemtesterStop",
error,
in_handle);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1788,9 +1788,9 @@
void MemtesterStopAsync(
const std::string& in_handle,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1804,16 +1804,16 @@
bool BadblocksStart(
const dbus::FileDescriptor& in_outfd,
std::string* out_status,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"BadblocksStart",
error,
in_outfd);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_status);
}
@@ -1821,9 +1821,9 @@
void BadblocksStartAsync(
const dbus::FileDescriptor& in_outfd,
const base::Callback<void(const std::string& /*status*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1836,16 +1836,16 @@
// Stops running badblocks.
bool BadblocksStop(
const std::string& in_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"BadblocksStop",
error,
in_handle);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1853,9 +1853,9 @@
void BadblocksStopAsync(
const std::string& in_handle,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1879,11 +1879,11 @@
bool PacketCaptureStart(
const dbus::FileDescriptor& in_statfd,
const dbus::FileDescriptor& in_outfd,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
std::string* out_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1892,7 +1892,7 @@
in_statfd,
in_outfd,
in_options);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_handle);
}
@@ -1910,11 +1910,11 @@
void PacketCaptureStartAsync(
const dbus::FileDescriptor& in_statfd,
const dbus::FileDescriptor& in_outfd,
- const chromeos::VariantDictionary& in_options,
+ const brillo::VariantDictionary& in_options,
const base::Callback<void(const std::string& /*handle*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1929,16 +1929,16 @@
// Stops a running packet capture.
bool PacketCaptureStop(
const std::string& in_handle,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"PacketCaptureStop",
error,
in_handle);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1946,9 +1946,9 @@
void PacketCaptureStopAsync(
const std::string& in_handle,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1961,15 +1961,15 @@
// Triggers show-task-states(T) SysRq.
// See https://www.kernel.org/doc/Documentation/sysrq.txt.
bool LogKernelTaskStates(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"LogKernelTaskStates",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1977,9 +1977,9 @@
// See https://www.kernel.org/doc/Documentation/sysrq.txt.
void LogKernelTaskStatesAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -1990,24 +1990,24 @@
// Triggers uploading of system crashes (the crash_sender program).
bool UploadCrashes(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"UploadCrashes",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
// Triggers uploading of system crashes (the crash_sender program).
void UploadCrashesAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -2019,15 +2019,15 @@
// Removes rootfs verification. Requires a system reboot before it will
// take effect. Restricted to pre-owner dev mode.
bool RemoveRootfsVerification(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"RemoveRootfsVerification",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -2035,9 +2035,9 @@
// take effect. Restricted to pre-owner dev mode.
void RemoveRootfsVerificationAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -2048,24 +2048,24 @@
// Enables OS booting from a USB image. Restricted to pre-owner dev mode.
bool EnableBootFromUsb(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"EnableBootFromUsb",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
// Enables OS booting from a USB image. Restricted to pre-owner dev mode.
void EnableBootFromUsbAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -2079,15 +2079,15 @@
// that rootfs verification has been removed. Restricted to pre-owner dev
// mode.
bool ConfigureSshServer(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"ConfigureSshServer",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -2097,9 +2097,9 @@
// mode.
void ConfigureSshServerAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -2113,9 +2113,9 @@
bool SetUserPassword(
const std::string& in_username,
const std::string& in_password,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -2123,7 +2123,7 @@
error,
in_username,
in_password);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -2133,9 +2133,9 @@
const std::string& in_username,
const std::string& in_password,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -2151,15 +2151,15 @@
// Requires that rootfs verification has been removed. Restricted to
// pre-owner dev mode.
bool EnableChromeRemoteDebugging(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"EnableChromeRemoteDebugging",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -2169,9 +2169,9 @@
// pre-owner dev mode.
void EnableChromeRemoteDebuggingAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -2190,16 +2190,16 @@
// further configuration or rollback. Restricted to pre-owner dev mode.
bool EnableChromeDevFeatures(
const std::string& in_root_password,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"EnableChromeDevFeatures",
error,
in_root_password);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -2214,9 +2214,9 @@
void EnableChromeDevFeaturesAsync(
const std::string& in_root_password,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -2233,15 +2233,15 @@
// set and the rest of the bits will always be set to 0.
bool QueryDevFeatures(
int32_t* out_features,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"QueryDevFeatures",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_features);
}
@@ -2252,9 +2252,9 @@
// set and the rest of the bits will always be set to 0.
void QueryDevFeaturesAsync(
const base::Callback<void(int32_t /*features*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -2265,24 +2265,24 @@
// Allow uploading of device coredump files.
bool EnableDevCoredumpUpload(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"EnableDevCoredumpUpload",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
// Allow uploading of device coredump files.
void EnableDevCoredumpUploadAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
@@ -2293,24 +2293,24 @@
// Disallow uploading of device coredump files.
bool DisableDevCoredumpUpload(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
"DisableDevCoredumpUpload",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
// Disallow uploading of device coredump files.
void DisableDevCoredumpUploadAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.debugd",
diff --git a/include/debugd/dbus-proxy-mocks.h b/include/debugd/dbus-proxy-mocks.h
index 5ff234e..042a9fd 100644
--- a/include/debugd/dbus-proxy-mocks.h
+++ b/include/debugd/dbus-proxy-mocks.h
@@ -8,9 +8,9 @@
#include <base/callback_forward.h>
#include <base/logging.h>
#include <base/macros.h>
-#include <chromeos/any.h>
-#include <chromeos/errors/error.h>
-#include <chromeos/variant_dictionary.h>
+#include <brillo/any.h>
+#include <brillo/errors/error.h>
+#include <brillo/variant_dictionary.h>
#include <gmock/gmock.h>
#include "debugd/dbus-proxies.h"
@@ -26,118 +26,118 @@
MOCK_METHOD6(PingStart,
bool(const dbus::FileDescriptor& /*in_outfd*/,
const std::string& /*in_destination*/,
- const chromeos::VariantDictionary& /*in_options*/,
+ const brillo::VariantDictionary& /*in_options*/,
std::string* /*out_handle*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD6(PingStartAsync,
void(const dbus::FileDescriptor& /*in_outfd*/,
const std::string& /*in_destination*/,
- const chromeos::VariantDictionary& /*in_options*/,
+ const brillo::VariantDictionary& /*in_options*/,
const base::Callback<void(const std::string& /*handle*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(PingStop,
bool(const std::string& /*in_handle*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(PingStopAsync,
void(const std::string& /*in_handle*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(SystraceStart,
bool(const std::string& /*in_categories*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(SystraceStartAsync,
void(const std::string& /*in_categories*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(SystraceStop,
bool(const dbus::FileDescriptor& /*in_outfd*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(SystraceStopAsync,
void(const dbus::FileDescriptor& /*in_outfd*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(SystraceStatus,
bool(std::string* /*out_status*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(SystraceStatusAsync,
void(const base::Callback<void(const std::string& /*status*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD6(TracePathStart,
bool(const dbus::FileDescriptor& /*in_outfd*/,
const std::string& /*in_destination*/,
- const chromeos::VariantDictionary& /*in_options*/,
+ const brillo::VariantDictionary& /*in_options*/,
std::string* /*out_handle*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD6(TracePathStartAsync,
void(const dbus::FileDescriptor& /*in_outfd*/,
const std::string& /*in_destination*/,
- const chromeos::VariantDictionary& /*in_options*/,
+ const brillo::VariantDictionary& /*in_options*/,
const base::Callback<void(const std::string& /*handle*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(TracePathStop,
bool(const std::string& /*in_handle*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(TracePathStopAsync,
void(const std::string& /*in_handle*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(GetRoutes,
- bool(const chromeos::VariantDictionary& /*in_options*/,
+ bool(const brillo::VariantDictionary& /*in_options*/,
std::vector<std::string>* /*out_result*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(GetRoutesAsync,
- void(const chromeos::VariantDictionary& /*in_options*/,
+ void(const brillo::VariantDictionary& /*in_options*/,
const base::Callback<void(const std::vector<std::string>& /*result*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetModemStatus,
bool(std::string* /*out_status*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetModemStatusAsync,
void(const base::Callback<void(const std::string& /*status*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(RunModemCommand,
bool(const std::string& /*in_command*/,
std::string* /*out_status*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(RunModemCommandAsync,
void(const std::string& /*in_command*/,
const base::Callback<void(const std::string& /*status*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetNetworkStatus,
bool(std::string* /*out_status*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetNetworkStatusAsync,
void(const base::Callback<void(const std::string& /*status*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetWiMaxStatus,
bool(std::string* /*out_status*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetWiMaxStatusAsync,
void(const base::Callback<void(const std::string& /*status*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD7(GetPerfOutput,
bool(uint32_t /*in_duration_sec*/,
@@ -145,303 +145,303 @@
int32_t* /*out_status*/,
std::vector<uint8_t>* /*out_perf_data*/,
std::vector<uint8_t>* /*out_perf_stat*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(GetPerfOutputAsync,
void(uint32_t /*in_duration_sec*/,
const std::vector<std::string>& /*in_perf_args*/,
const base::Callback<void(int32_t /*status*/, const std::vector<uint8_t>& /*perf_data*/, const std::vector<uint8_t>& /*perf_stat*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD6(GetRandomPerfOutput,
bool(uint32_t /*in_duration_sec*/,
int32_t* /*out_status*/,
std::vector<uint8_t>* /*out_perf_data*/,
std::vector<uint8_t>* /*out_perf_stat*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(GetRandomPerfOutputAsync,
void(uint32_t /*in_duration_sec*/,
const base::Callback<void(int32_t /*status*/, const std::vector<uint8_t>& /*perf_data*/, const std::vector<uint8_t>& /*perf_stat*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(GetRichPerfData,
bool(uint32_t /*in_duration_sec*/,
std::vector<uint8_t>* /*out_status*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(GetRichPerfDataAsync,
void(uint32_t /*in_duration_sec*/,
const base::Callback<void(const std::vector<uint8_t>& /*status*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetDebugLogs,
bool(const dbus::FileDescriptor& /*in_outfd*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(GetDebugLogsAsync,
void(const dbus::FileDescriptor& /*in_outfd*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(DumpDebugLogs,
bool(bool /*in_is_compressed*/,
const dbus::FileDescriptor& /*in_outfd*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(DumpDebugLogsAsync,
void(bool /*in_is_compressed*/,
const dbus::FileDescriptor& /*in_outfd*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(SetDebugMode,
bool(const std::string& /*in_subsystem*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(SetDebugModeAsync,
void(const std::string& /*in_subsystem*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(GetLog,
bool(const std::string& /*in_log*/,
std::string* /*out_contents*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(GetLogAsync,
void(const std::string& /*in_log*/,
const base::Callback<void(const std::string& /*contents*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetAllLogs,
bool(std::map<std::string, std::string>* /*out_logs*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetAllLogsAsync,
void(const base::Callback<void(const std::map<std::string, std::string>& /*logs*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetFeedbackLogs,
bool(std::map<std::string, std::string>* /*out_logs*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetFeedbackLogsAsync,
void(const base::Callback<void(const std::map<std::string, std::string>& /*logs*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetUserLogFiles,
bool(std::map<std::string, std::string>* /*out_user_log_files*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetUserLogFilesAsync,
void(const base::Callback<void(const std::map<std::string, std::string>& /*user_log_files*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetExample,
bool(std::string* /*out_result*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetExampleAsync,
void(const base::Callback<void(const std::string& /*result*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetInterfaces,
bool(std::string* /*out_result*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetInterfacesAsync,
void(const base::Callback<void(const std::string& /*result*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(TestICMP,
bool(const std::string& /*in_host*/,
std::string* /*out_result*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(TestICMPAsync,
void(const std::string& /*in_host*/,
const base::Callback<void(const std::string& /*result*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD5(TestICMPWithOptions,
bool(const std::string& /*in_host*/,
const std::map<std::string, std::string>& /*in_options*/,
std::string* /*out_result*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(TestICMPWithOptionsAsync,
void(const std::string& /*in_host*/,
const std::map<std::string, std::string>& /*in_options*/,
const base::Callback<void(const std::string& /*result*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(BatteryFirmware,
bool(const std::string& /*in_option*/,
std::string* /*out_result*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(BatteryFirmwareAsync,
void(const std::string& /*in_option*/,
const base::Callback<void(const std::string& /*result*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(Smartctl,
bool(const std::string& /*in_option*/,
std::string* /*out_result*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(SmartctlAsync,
void(const std::string& /*in_option*/,
const base::Callback<void(const std::string& /*result*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD5(MemtesterStart,
bool(const dbus::FileDescriptor& /*in_outfd*/,
uint32_t /*in_memory*/,
std::string* /*out_status*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(MemtesterStartAsync,
void(const dbus::FileDescriptor& /*in_outfd*/,
uint32_t /*in_memory*/,
const base::Callback<void(const std::string& /*status*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(MemtesterStop,
bool(const std::string& /*in_handle*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(MemtesterStopAsync,
void(const std::string& /*in_handle*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(BadblocksStart,
bool(const dbus::FileDescriptor& /*in_outfd*/,
std::string* /*out_status*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(BadblocksStartAsync,
void(const dbus::FileDescriptor& /*in_outfd*/,
const base::Callback<void(const std::string& /*status*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(BadblocksStop,
bool(const std::string& /*in_handle*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(BadblocksStopAsync,
void(const std::string& /*in_handle*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD6(PacketCaptureStart,
bool(const dbus::FileDescriptor& /*in_statfd*/,
const dbus::FileDescriptor& /*in_outfd*/,
- const chromeos::VariantDictionary& /*in_options*/,
+ const brillo::VariantDictionary& /*in_options*/,
std::string* /*out_handle*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD6(PacketCaptureStartAsync,
void(const dbus::FileDescriptor& /*in_statfd*/,
const dbus::FileDescriptor& /*in_outfd*/,
- const chromeos::VariantDictionary& /*in_options*/,
+ const brillo::VariantDictionary& /*in_options*/,
const base::Callback<void(const std::string& /*handle*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(PacketCaptureStop,
bool(const std::string& /*in_handle*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(PacketCaptureStopAsync,
void(const std::string& /*in_handle*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(LogKernelTaskStates,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(LogKernelTaskStatesAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(UploadCrashes,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(UploadCrashesAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(RemoveRootfsVerification,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(RemoveRootfsVerificationAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(EnableBootFromUsb,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(EnableBootFromUsbAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(ConfigureSshServer,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(ConfigureSshServerAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(SetUserPassword,
bool(const std::string& /*in_username*/,
const std::string& /*in_password*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(SetUserPasswordAsync,
void(const std::string& /*in_username*/,
const std::string& /*in_password*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(EnableChromeRemoteDebugging,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(EnableChromeRemoteDebuggingAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(EnableChromeDevFeatures,
bool(const std::string& /*in_root_password*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(EnableChromeDevFeaturesAsync,
void(const std::string& /*in_root_password*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(QueryDevFeatures,
bool(int32_t* /*out_features*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(QueryDevFeaturesAsync,
void(const base::Callback<void(int32_t /*features*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(EnableDevCoredumpUpload,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(EnableDevCoredumpUploadAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(DisableDevCoredumpUpload,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(DisableDevCoredumpUploadAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
private:
diff --git a/include/power_manager/dbus-proxies.h b/include/power_manager/dbus-proxies.h
index 087f0cf..e66848d 100644
--- a/include/power_manager/dbus-proxies.h
+++ b/include/power_manager/dbus-proxies.h
@@ -11,12 +11,12 @@
#include <base/logging.h>
#include <base/macros.h>
#include <base/memory/ref_counted.h>
-#include <chromeos/any.h>
-#include <chromeos/dbus/dbus_method_invoker.h>
-#include <chromeos/dbus/dbus_property.h>
-#include <chromeos/dbus/dbus_signal_handler.h>
-#include <chromeos/errors/error.h>
-#include <chromeos/variant_dictionary.h>
+#include <brillo/any.h>
+#include <brillo/dbus/dbus_method_invoker.h>
+#include <brillo/dbus/dbus_property.h>
+#include <brillo/dbus/dbus_signal_handler.h>
+#include <brillo/errors/error.h>
+#include <brillo/variant_dictionary.h>
#include <dbus/bus.h>
#include <dbus/message.h>
#include <dbus/object_manager.h>
@@ -32,25 +32,25 @@
virtual ~PowerManagerProxyInterface() = default;
virtual bool RequestShutdown(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void RequestShutdownAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |reason| arg is a power_manager::RequestRestartReason value.
virtual bool RequestRestart(
int32_t in_reason,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |reason| arg is a power_manager::RequestRestartReason value.
virtual void RequestRestartAsync(
int32_t in_reason,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |external_wakeup_count| arg is optional, and it will call two
@@ -58,7 +58,7 @@
// Introspection XML file.
virtual bool RequestSuspend(
uint64_t in_external_wakeup_count,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |external_wakeup_count| arg is optional, and it will call two
@@ -67,37 +67,37 @@
virtual void RequestSuspendAsync(
uint64_t in_external_wakeup_count,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool DecreaseScreenBrightness(
bool in_allow_off,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void DecreaseScreenBrightnessAsync(
bool in_allow_off,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool IncreaseScreenBrightness(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void IncreaseScreenBrightnessAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool GetScreenBrightnessPercent(
double* out_percent,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void GetScreenBrightnessPercentAsync(
const base::Callback<void(double /*percent*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |style| arg must be one of the values:
@@ -106,7 +106,7 @@
virtual bool SetScreenBrightnessPercent(
double in_percent,
int32_t in_style,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |style| arg must be one of the values:
@@ -116,81 +116,81 @@
double in_percent,
int32_t in_style,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool DecreaseKeyboardBrightness(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void DecreaseKeyboardBrightnessAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool IncreaseKeyboardBrightness(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void IncreaseKeyboardBrightnessAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
// power_manager::PowerSupplyProperties protobuf.
virtual bool GetPowerSupplyProperties(
std::vector<uint8_t>* out_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
// power_manager::PowerSupplyProperties protobuf.
virtual void GetPowerSupplyPropertiesAsync(
const base::Callback<void(const std::vector<uint8_t>& /*serialized_proto*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool HandleVideoActivity(
bool in_fullscreen,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void HandleVideoActivityAsync(
bool in_fullscreen,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |type| arg is a power_manager::UserActivityType.
virtual bool HandleUserActivity(
int32_t in_type,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |type| arg is a power_manager::UserActivityType.
virtual void HandleUserActivityAsync(
int32_t in_type,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool SetIsProjecting(
bool in_is_projecting,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void SetIsProjectingAsync(
bool in_is_projecting,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
// power_manager::PowerManagementPolicy protobuf.
virtual bool SetPolicy(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
@@ -198,25 +198,25 @@
virtual void SetPolicyAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool SetPowerSource(
const std::string& in_id,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void SetPowerSourceAsync(
const std::string& in_id,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |timestamp_internal| arg is represented as the return value of
// base::TimeTicks::ToInternalValue().
virtual bool HandlePowerButtonAcknowledgment(
int64_t in_timestamp_internal,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |timestamp_internal| arg is represented as the return value of
@@ -224,7 +224,7 @@
virtual void HandlePowerButtonAcknowledgmentAsync(
int64_t in_timestamp_internal,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_request_proto| arg is a serialized
@@ -234,7 +234,7 @@
virtual bool RegisterSuspendDelay(
const std::vector<uint8_t>& in_serialized_request_proto,
std::vector<uint8_t>* out_serialized_reply_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_request_proto| arg is a serialized
@@ -244,14 +244,14 @@
virtual void RegisterSuspendDelayAsync(
const std::vector<uint8_t>& in_serialized_request_proto,
const base::Callback<void(const std::vector<uint8_t>& /*serialized_reply_proto*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
// power_manager::UnregisterSuspendDelayRequest protobuf.
virtual bool UnregisterSuspendDelay(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
@@ -259,14 +259,14 @@
virtual void UnregisterSuspendDelayAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
// power_manager::SuspendReadinessInfo protobuf.
virtual bool HandleSuspendReadiness(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
@@ -274,7 +274,7 @@
virtual void HandleSuspendReadinessAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_request_proto| arg is a serialized
@@ -284,7 +284,7 @@
virtual bool RegisterDarkSuspendDelay(
const std::vector<uint8_t>& in_serialized_request_proto,
std::vector<uint8_t>* out_serialized_reply_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_request_proto| arg is a serialized
@@ -294,14 +294,14 @@
virtual void RegisterDarkSuspendDelayAsync(
const std::vector<uint8_t>& in_serialized_request_proto,
const base::Callback<void(const std::vector<uint8_t>& /*serialized_reply_proto*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
// power_manager::UnregisterSuspendDelayRequest protobuf.
virtual bool UnregisterDarkSuspendDelay(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
@@ -309,14 +309,14 @@
virtual void UnregisterDarkSuspendDelayAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
// power_manager::SuspendReadinessInfo protobuf.
virtual bool HandleDarkSuspendReadiness(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
@@ -324,14 +324,14 @@
virtual void HandleDarkSuspendReadinessAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
// power_manager::DarkResumeWakeReason protobuf.
virtual bool RecordDarkResumeWakeReason(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
// The |serialized_proto| arg is a serialized
@@ -339,7 +339,7 @@
virtual void RecordDarkResumeWakeReasonAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void RegisterBrightnessChangedSignalHandler(
@@ -409,7 +409,7 @@
const base::Callback<void(int32_t,
bool)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.PowerManager",
"BrightnessChanged",
@@ -421,7 +421,7 @@
const base::Callback<void(int32_t,
bool)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.PowerManager",
"KeyboardBrightnessChanged",
@@ -432,7 +432,7 @@
void RegisterPeripheralBatteryStatusSignalHandler(
const base::Callback<void(const std::vector<uint8_t>&)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.PowerManager",
"PeripheralBatteryStatus",
@@ -443,7 +443,7 @@
void RegisterPowerSupplyPollSignalHandler(
const base::Callback<void(const std::vector<uint8_t>&)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.PowerManager",
"PowerSupplyPoll",
@@ -454,7 +454,7 @@
void RegisterSuspendImminentSignalHandler(
const base::Callback<void(const std::vector<uint8_t>&)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.PowerManager",
"SuspendImminent",
@@ -465,7 +465,7 @@
void RegisterSuspendDoneSignalHandler(
const base::Callback<void(const std::vector<uint8_t>&)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.PowerManager",
"SuspendDone",
@@ -476,7 +476,7 @@
void RegisterDarkSuspendImminentSignalHandler(
const base::Callback<void(const std::vector<uint8_t>&)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.PowerManager",
"DarkSuspendImminent",
@@ -487,7 +487,7 @@
void RegisterInputEventSignalHandler(
const base::Callback<void(const std::vector<uint8_t>&)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.PowerManager",
"InputEvent",
@@ -498,7 +498,7 @@
void RegisterIdleActionImminentSignalHandler(
const base::Callback<void(const std::vector<uint8_t>&)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.PowerManager",
"IdleActionImminent",
@@ -509,7 +509,7 @@
void RegisterIdleActionDeferredSignalHandler(
const base::Closure& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.PowerManager",
"IdleActionDeferred",
@@ -528,23 +528,23 @@
dbus::ObjectProxy* GetObjectProxy() const { return dbus_object_proxy_; }
bool RequestShutdown(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"RequestShutdown",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void RequestShutdownAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -556,16 +556,16 @@
// The |reason| arg is a power_manager::RequestRestartReason value.
bool RequestRestart(
int32_t in_reason,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"RequestRestart",
error,
in_reason);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -573,9 +573,9 @@
void RequestRestartAsync(
int32_t in_reason,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -590,16 +590,16 @@
// Introspection XML file.
bool RequestSuspend(
uint64_t in_external_wakeup_count,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"RequestSuspend",
error,
in_external_wakeup_count);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -609,9 +609,9 @@
void RequestSuspendAsync(
uint64_t in_external_wakeup_count,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -623,25 +623,25 @@
bool DecreaseScreenBrightness(
bool in_allow_off,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"DecreaseScreenBrightness",
error,
in_allow_off);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void DecreaseScreenBrightnessAsync(
bool in_allow_off,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -652,23 +652,23 @@
}
bool IncreaseScreenBrightness(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"IncreaseScreenBrightness",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void IncreaseScreenBrightnessAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -679,23 +679,23 @@
bool GetScreenBrightnessPercent(
double* out_percent,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"GetScreenBrightnessPercent",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_percent);
}
void GetScreenBrightnessPercentAsync(
const base::Callback<void(double /*percent*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -710,9 +710,9 @@
bool SetScreenBrightnessPercent(
double in_percent,
int32_t in_style,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -720,7 +720,7 @@
error,
in_percent,
in_style);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -731,9 +731,9 @@
double in_percent,
int32_t in_style,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -745,23 +745,23 @@
}
bool DecreaseKeyboardBrightness(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"DecreaseKeyboardBrightness",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void DecreaseKeyboardBrightnessAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -771,23 +771,23 @@
}
bool IncreaseKeyboardBrightness(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"IncreaseKeyboardBrightness",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void IncreaseKeyboardBrightnessAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -800,15 +800,15 @@
// power_manager::PowerSupplyProperties protobuf.
bool GetPowerSupplyProperties(
std::vector<uint8_t>* out_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"GetPowerSupplyProperties",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_serialized_proto);
}
@@ -816,9 +816,9 @@
// power_manager::PowerSupplyProperties protobuf.
void GetPowerSupplyPropertiesAsync(
const base::Callback<void(const std::vector<uint8_t>& /*serialized_proto*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -829,25 +829,25 @@
bool HandleVideoActivity(
bool in_fullscreen,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"HandleVideoActivity",
error,
in_fullscreen);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void HandleVideoActivityAsync(
bool in_fullscreen,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -860,16 +860,16 @@
// The |type| arg is a power_manager::UserActivityType.
bool HandleUserActivity(
int32_t in_type,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"HandleUserActivity",
error,
in_type);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -877,9 +877,9 @@
void HandleUserActivityAsync(
int32_t in_type,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -891,25 +891,25 @@
bool SetIsProjecting(
bool in_is_projecting,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"SetIsProjecting",
error,
in_is_projecting);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void SetIsProjectingAsync(
bool in_is_projecting,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -923,16 +923,16 @@
// power_manager::PowerManagementPolicy protobuf.
bool SetPolicy(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"SetPolicy",
error,
in_serialized_proto);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -941,9 +941,9 @@
void SetPolicyAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -955,25 +955,25 @@
bool SetPowerSource(
const std::string& in_id,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"SetPowerSource",
error,
in_id);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void SetPowerSourceAsync(
const std::string& in_id,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -987,16 +987,16 @@
// base::TimeTicks::ToInternalValue().
bool HandlePowerButtonAcknowledgment(
int64_t in_timestamp_internal,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"HandlePowerButtonAcknowledgment",
error,
in_timestamp_internal);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1005,9 +1005,9 @@
void HandlePowerButtonAcknowledgmentAsync(
int64_t in_timestamp_internal,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -1024,16 +1024,16 @@
bool RegisterSuspendDelay(
const std::vector<uint8_t>& in_serialized_request_proto,
std::vector<uint8_t>* out_serialized_reply_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"RegisterSuspendDelay",
error,
in_serialized_request_proto);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_serialized_reply_proto);
}
@@ -1044,9 +1044,9 @@
void RegisterSuspendDelayAsync(
const std::vector<uint8_t>& in_serialized_request_proto,
const base::Callback<void(const std::vector<uint8_t>& /*serialized_reply_proto*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -1060,16 +1060,16 @@
// power_manager::UnregisterSuspendDelayRequest protobuf.
bool UnregisterSuspendDelay(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"UnregisterSuspendDelay",
error,
in_serialized_proto);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1078,9 +1078,9 @@
void UnregisterSuspendDelayAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -1094,16 +1094,16 @@
// power_manager::SuspendReadinessInfo protobuf.
bool HandleSuspendReadiness(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"HandleSuspendReadiness",
error,
in_serialized_proto);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1112,9 +1112,9 @@
void HandleSuspendReadinessAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -1131,16 +1131,16 @@
bool RegisterDarkSuspendDelay(
const std::vector<uint8_t>& in_serialized_request_proto,
std::vector<uint8_t>* out_serialized_reply_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"RegisterDarkSuspendDelay",
error,
in_serialized_request_proto);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_serialized_reply_proto);
}
@@ -1151,9 +1151,9 @@
void RegisterDarkSuspendDelayAsync(
const std::vector<uint8_t>& in_serialized_request_proto,
const base::Callback<void(const std::vector<uint8_t>& /*serialized_reply_proto*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -1167,16 +1167,16 @@
// power_manager::UnregisterSuspendDelayRequest protobuf.
bool UnregisterDarkSuspendDelay(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"UnregisterDarkSuspendDelay",
error,
in_serialized_proto);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1185,9 +1185,9 @@
void UnregisterDarkSuspendDelayAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -1201,16 +1201,16 @@
// power_manager::SuspendReadinessInfo protobuf.
bool HandleDarkSuspendReadiness(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"HandleDarkSuspendReadiness",
error,
in_serialized_proto);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1219,9 +1219,9 @@
void HandleDarkSuspendReadinessAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
@@ -1235,16 +1235,16 @@
// power_manager::DarkResumeWakeReason protobuf.
bool RecordDarkResumeWakeReason(
const std::vector<uint8_t>& in_serialized_proto,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
"RecordDarkResumeWakeReason",
error,
in_serialized_proto);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -1253,9 +1253,9 @@
void RecordDarkResumeWakeReasonAsync(
const std::vector<uint8_t>& in_serialized_proto,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.PowerManager",
diff --git a/include/power_manager/dbus-proxy-mocks.h b/include/power_manager/dbus-proxy-mocks.h
index 6fd4acf..d4e3dd0 100644
--- a/include/power_manager/dbus-proxy-mocks.h
+++ b/include/power_manager/dbus-proxy-mocks.h
@@ -8,9 +8,9 @@
#include <base/callback_forward.h>
#include <base/logging.h>
#include <base/macros.h>
-#include <chromeos/any.h>
-#include <chromeos/errors/error.h>
-#include <chromeos/variant_dictionary.h>
+#include <brillo/any.h>
+#include <brillo/errors/error.h>
+#include <brillo/variant_dictionary.h>
#include <gmock/gmock.h>
#include "power_manager/dbus-proxies.h"
@@ -24,205 +24,205 @@
PowerManagerProxyMock() = default;
MOCK_METHOD2(RequestShutdown,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(RequestShutdownAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(RequestRestart,
bool(int32_t /*in_reason*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(RequestRestartAsync,
void(int32_t /*in_reason*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(RequestSuspend,
bool(uint64_t /*in_external_wakeup_count*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(RequestSuspendAsync,
void(uint64_t /*in_external_wakeup_count*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(DecreaseScreenBrightness,
bool(bool /*in_allow_off*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(DecreaseScreenBrightnessAsync,
void(bool /*in_allow_off*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(IncreaseScreenBrightness,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(IncreaseScreenBrightnessAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetScreenBrightnessPercent,
bool(double* /*out_percent*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetScreenBrightnessPercentAsync,
void(const base::Callback<void(double /*percent*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(SetScreenBrightnessPercent,
bool(double /*in_percent*/,
int32_t /*in_style*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(SetScreenBrightnessPercentAsync,
void(double /*in_percent*/,
int32_t /*in_style*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(DecreaseKeyboardBrightness,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(DecreaseKeyboardBrightnessAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(IncreaseKeyboardBrightness,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(IncreaseKeyboardBrightnessAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetPowerSupplyProperties,
bool(std::vector<uint8_t>* /*out_serialized_proto*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetPowerSupplyPropertiesAsync,
void(const base::Callback<void(const std::vector<uint8_t>& /*serialized_proto*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(HandleVideoActivity,
bool(bool /*in_fullscreen*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(HandleVideoActivityAsync,
void(bool /*in_fullscreen*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(HandleUserActivity,
bool(int32_t /*in_type*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(HandleUserActivityAsync,
void(int32_t /*in_type*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(SetIsProjecting,
bool(bool /*in_is_projecting*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(SetIsProjectingAsync,
void(bool /*in_is_projecting*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(SetPolicy,
bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(SetPolicyAsync,
void(const std::vector<uint8_t>& /*in_serialized_proto*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(SetPowerSource,
bool(const std::string& /*in_id*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(SetPowerSourceAsync,
void(const std::string& /*in_id*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(HandlePowerButtonAcknowledgment,
bool(int64_t /*in_timestamp_internal*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(HandlePowerButtonAcknowledgmentAsync,
void(int64_t /*in_timestamp_internal*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(RegisterSuspendDelay,
bool(const std::vector<uint8_t>& /*in_serialized_request_proto*/,
std::vector<uint8_t>* /*out_serialized_reply_proto*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(RegisterSuspendDelayAsync,
void(const std::vector<uint8_t>& /*in_serialized_request_proto*/,
const base::Callback<void(const std::vector<uint8_t>& /*serialized_reply_proto*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(UnregisterSuspendDelay,
bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(UnregisterSuspendDelayAsync,
void(const std::vector<uint8_t>& /*in_serialized_proto*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(HandleSuspendReadiness,
bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(HandleSuspendReadinessAsync,
void(const std::vector<uint8_t>& /*in_serialized_proto*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(RegisterDarkSuspendDelay,
bool(const std::vector<uint8_t>& /*in_serialized_request_proto*/,
std::vector<uint8_t>* /*out_serialized_reply_proto*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(RegisterDarkSuspendDelayAsync,
void(const std::vector<uint8_t>& /*in_serialized_request_proto*/,
const base::Callback<void(const std::vector<uint8_t>& /*serialized_reply_proto*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(UnregisterDarkSuspendDelay,
bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(UnregisterDarkSuspendDelayAsync,
void(const std::vector<uint8_t>& /*in_serialized_proto*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(HandleDarkSuspendReadiness,
bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(HandleDarkSuspendReadinessAsync,
void(const std::vector<uint8_t>& /*in_serialized_proto*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(RecordDarkResumeWakeReason,
bool(const std::vector<uint8_t>& /*in_serialized_proto*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(RecordDarkResumeWakeReasonAsync,
void(const std::vector<uint8_t>& /*in_serialized_proto*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(RegisterBrightnessChangedSignalHandler,
void(const base::Callback<void(int32_t,
diff --git a/include/session_manager/dbus-proxies.h b/include/session_manager/dbus-proxies.h
index f3424f8..2ca0128 100644
--- a/include/session_manager/dbus-proxies.h
+++ b/include/session_manager/dbus-proxies.h
@@ -11,12 +11,12 @@
#include <base/logging.h>
#include <base/macros.h>
#include <base/memory/ref_counted.h>
-#include <chromeos/any.h>
-#include <chromeos/dbus/dbus_method_invoker.h>
-#include <chromeos/dbus/dbus_property.h>
-#include <chromeos/dbus/dbus_signal_handler.h>
-#include <chromeos/errors/error.h>
-#include <chromeos/variant_dictionary.h>
+#include <brillo/any.h>
+#include <brillo/dbus/dbus_method_invoker.h>
+#include <brillo/dbus/dbus_property.h>
+#include <brillo/dbus/dbus_signal_handler.h>
+#include <brillo/errors/error.h>
+#include <brillo/variant_dictionary.h>
#include <dbus/bus.h>
#include <dbus/message.h>
#include <dbus/object_manager.h>
@@ -32,248 +32,248 @@
virtual ~SessionManagerInterfaceProxyInterface() = default;
virtual bool EmitLoginPromptVisible(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void EmitLoginPromptVisibleAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool EnableChromeTesting(
bool in_force_relaunch,
const std::vector<std::string>& in_extra_arguments,
std::string* out_filepath,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void EnableChromeTestingAsync(
bool in_force_relaunch,
const std::vector<std::string>& in_extra_arguments,
const base::Callback<void(const std::string& /*filepath*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool StartSession(
const std::string& in_email_address,
const std::string& in_unique_identifier,
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void StartSessionAsync(
const std::string& in_email_address,
const std::string& in_unique_identifier,
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool StopSession(
const std::string& in_unique_identifier,
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void StopSessionAsync(
const std::string& in_unique_identifier,
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool StorePolicy(
const std::vector<uint8_t>& in_policy_blob,
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void StorePolicyAsync(
const std::vector<uint8_t>& in_policy_blob,
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool RetrievePolicy(
std::vector<uint8_t>* out_policy_blob,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void RetrievePolicyAsync(
const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool StorePolicyForUser(
const std::string& in_user_email,
const std::vector<uint8_t>& in_policy_blob,
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void StorePolicyForUserAsync(
const std::string& in_user_email,
const std::vector<uint8_t>& in_policy_blob,
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool RetrievePolicyForUser(
const std::string& in_user_email,
std::vector<uint8_t>* out_policy_blob,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void RetrievePolicyForUserAsync(
const std::string& in_user_email,
const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool StoreDeviceLocalAccountPolicy(
const std::string& in_account_id,
const std::vector<uint8_t>& in_policy_blob,
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void StoreDeviceLocalAccountPolicyAsync(
const std::string& in_account_id,
const std::vector<uint8_t>& in_policy_blob,
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool RetrieveDeviceLocalAccountPolicy(
const std::string& in_account_id,
std::vector<uint8_t>* out_policy_blob,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void RetrieveDeviceLocalAccountPolicyAsync(
const std::string& in_account_id,
const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool RetrieveSessionState(
std::string* out_state,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void RetrieveSessionStateAsync(
const base::Callback<void(const std::string& /*state*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool RetrieveActiveSessions(
std::map<std::string, std::string>* out_sessions,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void RetrieveActiveSessionsAsync(
const base::Callback<void(const std::map<std::string, std::string>& /*sessions*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool HandleSupervisedUserCreationStarting(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void HandleSupervisedUserCreationStartingAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool HandleSupervisedUserCreationFinished(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void HandleSupervisedUserCreationFinishedAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool LockScreen(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void LockScreenAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool HandleLockScreenShown(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void HandleLockScreenShownAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool HandleLockScreenDismissed(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void HandleLockScreenDismissedAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool RestartJob(
const dbus::FileDescriptor& in_cred_fd,
const std::vector<std::string>& in_argv,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void RestartJobAsync(
const dbus::FileDescriptor& in_cred_fd,
const std::vector<std::string>& in_argv,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool StartDeviceWipe(
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void StartDeviceWipeAsync(
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool SetFlagsForUser(
const std::string& in_user_email,
const std::vector<std::string>& in_flags,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void SetFlagsForUserAsync(
const std::string& in_user_email,
const std::vector<std::string>& in_flags,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool GetServerBackedStateKeys(
std::vector<std::vector<uint8_t>>* out_state_keys,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void GetServerBackedStateKeysAsync(
const base::Callback<void(const std::vector<std::vector<uint8_t>>& /*state_keys*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual bool InitMachineInfo(
const std::string& in_data,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void InitMachineInfoAsync(
const std::string& in_data,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
virtual void RegisterLoginPromptVisibleSignalHandler(
@@ -324,7 +324,7 @@
void RegisterLoginPromptVisibleSignalHandler(
const base::Closure& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"LoginPromptVisible",
@@ -335,7 +335,7 @@
void RegisterSessionStateChangedSignalHandler(
const base::Callback<void(const std::string&)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"SessionStateChanged",
@@ -346,7 +346,7 @@
void RegisterSetOwnerKeyCompleteSignalHandler(
const base::Callback<void(const std::string&)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"SetOwnerKeyComplete",
@@ -357,7 +357,7 @@
void RegisterPropertyChangeCompleteSignalHandler(
const base::Callback<void(const std::string&)>& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"PropertyChangeComplete",
@@ -368,7 +368,7 @@
void RegisterScreenIsLockedSignalHandler(
const base::Closure& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"ScreenIsLocked",
@@ -379,7 +379,7 @@
void RegisterScreenIsUnlockedSignalHandler(
const base::Closure& signal_callback,
dbus::ObjectProxy::OnConnectedCallback on_connected_callback) override {
- chromeos::dbus_utils::ConnectToSignal(
+ brillo::dbus_utils::ConnectToSignal(
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"ScreenIsUnlocked",
@@ -398,23 +398,23 @@
dbus::ObjectProxy* GetObjectProxy() const { return dbus_object_proxy_; }
bool EmitLoginPromptVisible(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"EmitLoginPromptVisible",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void EmitLoginPromptVisibleAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -427,9 +427,9 @@
bool in_force_relaunch,
const std::vector<std::string>& in_extra_arguments,
std::string* out_filepath,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -437,7 +437,7 @@
error,
in_force_relaunch,
in_extra_arguments);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_filepath);
}
@@ -445,9 +445,9 @@
bool in_force_relaunch,
const std::vector<std::string>& in_extra_arguments,
const base::Callback<void(const std::string& /*filepath*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -462,9 +462,9 @@
const std::string& in_email_address,
const std::string& in_unique_identifier,
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -472,7 +472,7 @@
error,
in_email_address,
in_unique_identifier);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_done);
}
@@ -480,9 +480,9 @@
const std::string& in_email_address,
const std::string& in_unique_identifier,
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -496,25 +496,25 @@
bool StopSession(
const std::string& in_unique_identifier,
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"StopSession",
error,
in_unique_identifier);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_done);
}
void StopSessionAsync(
const std::string& in_unique_identifier,
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -527,25 +527,25 @@
bool StorePolicy(
const std::vector<uint8_t>& in_policy_blob,
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"StorePolicy",
error,
in_policy_blob);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_done);
}
void StorePolicyAsync(
const std::vector<uint8_t>& in_policy_blob,
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -557,23 +557,23 @@
bool RetrievePolicy(
std::vector<uint8_t>* out_policy_blob,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"RetrievePolicy",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_policy_blob);
}
void RetrievePolicyAsync(
const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -586,9 +586,9 @@
const std::string& in_user_email,
const std::vector<uint8_t>& in_policy_blob,
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -596,7 +596,7 @@
error,
in_user_email,
in_policy_blob);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_done);
}
@@ -604,9 +604,9 @@
const std::string& in_user_email,
const std::vector<uint8_t>& in_policy_blob,
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -620,25 +620,25 @@
bool RetrievePolicyForUser(
const std::string& in_user_email,
std::vector<uint8_t>* out_policy_blob,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"RetrievePolicyForUser",
error,
in_user_email);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_policy_blob);
}
void RetrievePolicyForUserAsync(
const std::string& in_user_email,
const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -652,9 +652,9 @@
const std::string& in_account_id,
const std::vector<uint8_t>& in_policy_blob,
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -662,7 +662,7 @@
error,
in_account_id,
in_policy_blob);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_done);
}
@@ -670,9 +670,9 @@
const std::string& in_account_id,
const std::vector<uint8_t>& in_policy_blob,
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -686,25 +686,25 @@
bool RetrieveDeviceLocalAccountPolicy(
const std::string& in_account_id,
std::vector<uint8_t>* out_policy_blob,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"RetrieveDeviceLocalAccountPolicy",
error,
in_account_id);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_policy_blob);
}
void RetrieveDeviceLocalAccountPolicyAsync(
const std::string& in_account_id,
const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -716,23 +716,23 @@
bool RetrieveSessionState(
std::string* out_state,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"RetrieveSessionState",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_state);
}
void RetrieveSessionStateAsync(
const base::Callback<void(const std::string& /*state*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -743,23 +743,23 @@
bool RetrieveActiveSessions(
std::map<std::string, std::string>* out_sessions,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"RetrieveActiveSessions",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_sessions);
}
void RetrieveActiveSessionsAsync(
const base::Callback<void(const std::map<std::string, std::string>& /*sessions*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -769,23 +769,23 @@
}
bool HandleSupervisedUserCreationStarting(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"HandleSupervisedUserCreationStarting",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void HandleSupervisedUserCreationStartingAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -795,23 +795,23 @@
}
bool HandleSupervisedUserCreationFinished(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"HandleSupervisedUserCreationFinished",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void HandleSupervisedUserCreationFinishedAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -821,23 +821,23 @@
}
bool LockScreen(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"LockScreen",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void LockScreenAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -847,23 +847,23 @@
}
bool HandleLockScreenShown(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"HandleLockScreenShown",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void HandleLockScreenShownAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -873,23 +873,23 @@
}
bool HandleLockScreenDismissed(
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"HandleLockScreenDismissed",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void HandleLockScreenDismissedAsync(
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -901,9 +901,9 @@
bool RestartJob(
const dbus::FileDescriptor& in_cred_fd,
const std::vector<std::string>& in_argv,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -911,7 +911,7 @@
error,
in_cred_fd,
in_argv);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -919,9 +919,9 @@
const dbus::FileDescriptor& in_cred_fd,
const std::vector<std::string>& in_argv,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -934,23 +934,23 @@
bool StartDeviceWipe(
bool* out_done,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"StartDeviceWipe",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_done);
}
void StartDeviceWipeAsync(
const base::Callback<void(bool /*done*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -962,9 +962,9 @@
bool SetFlagsForUser(
const std::string& in_user_email,
const std::vector<std::string>& in_flags,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -972,7 +972,7 @@
error,
in_user_email,
in_flags);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
@@ -980,9 +980,9 @@
const std::string& in_user_email,
const std::vector<std::string>& in_flags,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -995,23 +995,23 @@
bool GetServerBackedStateKeys(
std::vector<std::vector<uint8_t>>* out_state_keys,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"GetServerBackedStateKeys",
error);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error, out_state_keys);
}
void GetServerBackedStateKeysAsync(
const base::Callback<void(const std::vector<std::vector<uint8_t>>& /*state_keys*/)>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
@@ -1022,25 +1022,25 @@
bool InitMachineInfo(
const std::string& in_data,
- chromeos::ErrorPtr* error,
+ brillo::ErrorPtr* error,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+ auto response = brillo::dbus_utils::CallMethodAndBlockWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
"InitMachineInfo",
error,
in_data);
- return response && chromeos::dbus_utils::ExtractMethodCallResults(
+ return response && brillo::dbus_utils::ExtractMethodCallResults(
response.get(), error);
}
void InitMachineInfoAsync(
const std::string& in_data,
const base::Callback<void()>& success_callback,
- const base::Callback<void(chromeos::Error*)>& error_callback,
+ const base::Callback<void(brillo::Error*)>& error_callback,
int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
- chromeos::dbus_utils::CallMethodWithTimeout(
+ brillo::dbus_utils::CallMethodWithTimeout(
timeout_ms,
dbus_object_proxy_,
"org.chromium.SessionManagerInterface",
diff --git a/include/session_manager/dbus-proxy-mocks.h b/include/session_manager/dbus-proxy-mocks.h
index af9bcf5..2b6ce4d 100644
--- a/include/session_manager/dbus-proxy-mocks.h
+++ b/include/session_manager/dbus-proxy-mocks.h
@@ -8,9 +8,9 @@
#include <base/callback_forward.h>
#include <base/logging.h>
#include <base/macros.h>
-#include <chromeos/any.h>
-#include <chromeos/errors/error.h>
-#include <chromeos/variant_dictionary.h>
+#include <brillo/any.h>
+#include <brillo/errors/error.h>
+#include <brillo/variant_dictionary.h>
#include <gmock/gmock.h>
#include "session_manager/dbus-proxies.h"
@@ -24,205 +24,205 @@
SessionManagerInterfaceProxyMock() = default;
MOCK_METHOD2(EmitLoginPromptVisible,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(EmitLoginPromptVisibleAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD5(EnableChromeTesting,
bool(bool /*in_force_relaunch*/,
const std::vector<std::string>& /*in_extra_arguments*/,
std::string* /*out_filepath*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(EnableChromeTestingAsync,
void(bool /*in_force_relaunch*/,
const std::vector<std::string>& /*in_extra_arguments*/,
const base::Callback<void(const std::string& /*filepath*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD5(StartSession,
bool(const std::string& /*in_email_address*/,
const std::string& /*in_unique_identifier*/,
bool* /*out_done*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(StartSessionAsync,
void(const std::string& /*in_email_address*/,
const std::string& /*in_unique_identifier*/,
const base::Callback<void(bool /*done*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(StopSession,
bool(const std::string& /*in_unique_identifier*/,
bool* /*out_done*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(StopSessionAsync,
void(const std::string& /*in_unique_identifier*/,
const base::Callback<void(bool /*done*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(StorePolicy,
bool(const std::vector<uint8_t>& /*in_policy_blob*/,
bool* /*out_done*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(StorePolicyAsync,
void(const std::vector<uint8_t>& /*in_policy_blob*/,
const base::Callback<void(bool /*done*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(RetrievePolicy,
bool(std::vector<uint8_t>* /*out_policy_blob*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(RetrievePolicyAsync,
void(const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD5(StorePolicyForUser,
bool(const std::string& /*in_user_email*/,
const std::vector<uint8_t>& /*in_policy_blob*/,
bool* /*out_done*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(StorePolicyForUserAsync,
void(const std::string& /*in_user_email*/,
const std::vector<uint8_t>& /*in_policy_blob*/,
const base::Callback<void(bool /*done*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(RetrievePolicyForUser,
bool(const std::string& /*in_user_email*/,
std::vector<uint8_t>* /*out_policy_blob*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(RetrievePolicyForUserAsync,
void(const std::string& /*in_user_email*/,
const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD5(StoreDeviceLocalAccountPolicy,
bool(const std::string& /*in_account_id*/,
const std::vector<uint8_t>& /*in_policy_blob*/,
bool* /*out_done*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(StoreDeviceLocalAccountPolicyAsync,
void(const std::string& /*in_account_id*/,
const std::vector<uint8_t>& /*in_policy_blob*/,
const base::Callback<void(bool /*done*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(RetrieveDeviceLocalAccountPolicy,
bool(const std::string& /*in_account_id*/,
std::vector<uint8_t>* /*out_policy_blob*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(RetrieveDeviceLocalAccountPolicyAsync,
void(const std::string& /*in_account_id*/,
const base::Callback<void(const std::vector<uint8_t>& /*policy_blob*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(RetrieveSessionState,
bool(std::string* /*out_state*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(RetrieveSessionStateAsync,
void(const base::Callback<void(const std::string& /*state*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(RetrieveActiveSessions,
bool(std::map<std::string, std::string>* /*out_sessions*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(RetrieveActiveSessionsAsync,
void(const base::Callback<void(const std::map<std::string, std::string>& /*sessions*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(HandleSupervisedUserCreationStarting,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(HandleSupervisedUserCreationStartingAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(HandleSupervisedUserCreationFinished,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(HandleSupervisedUserCreationFinishedAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(LockScreen,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(LockScreenAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(HandleLockScreenShown,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(HandleLockScreenShownAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(HandleLockScreenDismissed,
- bool(chromeos::ErrorPtr* /*error*/,
+ bool(brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(HandleLockScreenDismissedAsync,
void(const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(RestartJob,
bool(const dbus::FileDescriptor& /*in_cred_fd*/,
const std::vector<std::string>& /*in_argv*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(RestartJobAsync,
void(const dbus::FileDescriptor& /*in_cred_fd*/,
const std::vector<std::string>& /*in_argv*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(StartDeviceWipe,
bool(bool* /*out_done*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(StartDeviceWipeAsync,
void(const base::Callback<void(bool /*done*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD4(SetFlagsForUser,
bool(const std::string& /*in_user_email*/,
const std::vector<std::string>& /*in_flags*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD5(SetFlagsForUserAsync,
void(const std::string& /*in_user_email*/,
const std::vector<std::string>& /*in_flags*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetServerBackedStateKeys,
bool(std::vector<std::vector<uint8_t>>* /*out_state_keys*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD3(GetServerBackedStateKeysAsync,
void(const base::Callback<void(const std::vector<std::vector<uint8_t>>& /*state_keys*/)>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD3(InitMachineInfo,
bool(const std::string& /*in_data*/,
- chromeos::ErrorPtr* /*error*/,
+ brillo::ErrorPtr* /*error*/,
int /*timeout_ms*/));
MOCK_METHOD4(InitMachineInfoAsync,
void(const std::string& /*in_data*/,
const base::Callback<void()>& /*success_callback*/,
- const base::Callback<void(chromeos::Error*)>& /*error_callback*/,
+ const base::Callback<void(brillo::Error*)>& /*error_callback*/,
int /*timeout_ms*/));
MOCK_METHOD2(RegisterLoginPromptVisibleSignalHandler,
void(const base::Closure& /*signal_callback*/,
diff --git a/install_plan.h b/install_plan.h
index 68aa1ae..14e5c5a 100644
--- a/install_plan.h
+++ b/install_plan.h
@@ -21,7 +21,7 @@
#include <vector>
#include <base/macros.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/action.h"
#include "update_engine/boot_control_interface.h"
@@ -87,11 +87,11 @@
std::string source_path;
uint64_t source_size{0};
- chromeos::Blob source_hash;
+ brillo::Blob source_hash;
std::string target_path;
uint64_t target_size{0};
- chromeos::Blob target_hash;
+ brillo::Blob target_hash;
// Whether we should run the postinstall script from this partition.
bool run_postinstall{false};
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index 5b6c605..8a3fd3b 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -30,7 +30,7 @@
#include "update_engine/hardware_interface.h"
using base::TimeDelta;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using std::max;
using std::string;
diff --git a/libcurl_http_fetcher.h b/libcurl_http_fetcher.h
index 2abf1e2..e652e37 100644
--- a/libcurl_http_fetcher.h
+++ b/libcurl_http_fetcher.h
@@ -25,7 +25,7 @@
#include <base/logging.h>
#include <base/macros.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include "update_engine/certificate_checker.h"
#include "update_engine/hardware_interface.h"
@@ -189,11 +189,11 @@
// the message loop. libcurl may open/close descriptors and switch their
// directions so maintain two separate lists so that watch conditions can be
// set appropriately.
- std::map<int, chromeos::MessageLoop::TaskId> fd_task_maps_[2];
+ std::map<int, brillo::MessageLoop::TaskId> fd_task_maps_[2];
// The TaskId of the timer we're waiting on. kTaskIdNull if we are not waiting
// on it.
- chromeos::MessageLoop::TaskId timeout_id_{chromeos::MessageLoop::kTaskIdNull};
+ brillo::MessageLoop::TaskId timeout_id_{brillo::MessageLoop::kTaskIdNull};
bool transfer_in_progress_{false};
diff --git a/main.cc b/main.cc
index f56d447..7b2ac19 100644
--- a/main.cc
+++ b/main.cc
@@ -27,8 +27,8 @@
#include <base/logging.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/flag_helper.h>
-#include <chromeos/message_loops/base_message_loop.h>
+#include <brillo/flag_helper.h>
+#include <brillo/message_loops/base_message_loop.h>
#include <metrics/metrics_library.h>
#include "update_engine/daemon.h"
@@ -107,7 +107,7 @@
"Don't daemon()ize; run in foreground.");
chromeos_update_engine::Terminator::Init();
- chromeos::FlagHelper::Init(argc, argv, "Chromium OS Update Engine");
+ brillo::FlagHelper::Init(argc, argv, "Chromium OS Update Engine");
chromeos_update_engine::SetupLogging(FLAGS_logtostderr);
if (!FLAGS_foreground)
PLOG_IF(FATAL, daemon(0, 0) == 1) << "daemon() failed";
diff --git a/mock_http_fetcher.cc b/mock_http_fetcher.cc
index b63389b..1a28e45 100644
--- a/mock_http_fetcher.cc
+++ b/mock_http_fetcher.cc
@@ -23,7 +23,7 @@
// This is a mock implementation of HttpFetcher which is useful for testing.
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using std::min;
namespace chromeos_update_engine {
diff --git a/mock_http_fetcher.h b/mock_http_fetcher.h
index 616b7b6..2515b00 100644
--- a/mock_http_fetcher.h
+++ b/mock_http_fetcher.h
@@ -21,7 +21,7 @@
#include <vector>
#include <base/logging.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include "update_engine/fake_system_state.h"
#include "update_engine/http_fetcher.h"
@@ -48,7 +48,7 @@
ProxyResolver* proxy_resolver)
: HttpFetcher(proxy_resolver, &fake_system_state_),
sent_size_(0),
- timeout_id_(chromeos::MessageLoop::kTaskIdNull),
+ timeout_id_(brillo::MessageLoop::kTaskIdNull),
paused_(false),
fail_transfer_(false),
never_use_(false) {
@@ -102,7 +102,7 @@
// If set to true, this will EXPECT fail on BeginTransfer
void set_never_use(bool never_use) { never_use_ = never_use; }
- const chromeos::Blob& post_data() const {
+ const brillo::Blob& post_data() const {
return post_data_;
}
@@ -123,14 +123,14 @@
void SignalTransferComplete();
// A full copy of the data we'll return to the delegate
- chromeos::Blob data_;
+ brillo::Blob data_;
// The number of bytes we've sent so far
size_t sent_size_;
// The TaskId of the timeout callback. After each chunk of data sent, we
// time out for 0s just to make sure that run loop services other clients.
- chromeos::MessageLoop::TaskId timeout_id_;
+ brillo::MessageLoop::TaskId timeout_id_;
// True iff the fetcher is paused.
bool paused_;
diff --git a/omaha_hash_calculator.cc b/omaha_hash_calculator.cc
index 7f654a7..cb01a56 100644
--- a/omaha_hash_calculator.cc
+++ b/omaha_hash_calculator.cc
@@ -20,7 +20,7 @@
#include <base/logging.h>
#include <base/posix/eintr_wrapper.h>
-#include <chromeos/data_encoding.h>
+#include <brillo/data_encoding.h>
#include "update_engine/utils.h"
@@ -52,7 +52,7 @@
}
const int kBufferSize = 128 * 1024; // 128 KiB
- chromeos::Blob buffer(kBufferSize);
+ brillo::Blob buffer(kBufferSize);
off_t bytes_processed = 0;
while (length < 0 || bytes_processed < length) {
off_t bytes_to_read = buffer.size();
@@ -82,14 +82,14 @@
TEST_AND_RETURN_FALSE(SHA256_Final(raw_hash_.data(), &ctx_) == 1);
// Convert raw_hash_ to base64 encoding and store it in hash_.
- hash_ = chromeos::data_encoding::Base64Encode(raw_hash_.data(),
- raw_hash_.size());
+ hash_ = brillo::data_encoding::Base64Encode(raw_hash_.data(),
+ raw_hash_.size());
return true;
}
bool OmahaHashCalculator::RawHashOfBytes(const void* data,
size_t length,
- chromeos::Blob* out_hash) {
+ brillo::Blob* out_hash) {
OmahaHashCalculator calc;
TEST_AND_RETURN_FALSE(calc.Update(data, length));
TEST_AND_RETURN_FALSE(calc.Finalize());
@@ -97,13 +97,13 @@
return true;
}
-bool OmahaHashCalculator::RawHashOfData(const chromeos::Blob& data,
- chromeos::Blob* out_hash) {
+bool OmahaHashCalculator::RawHashOfData(const brillo::Blob& data,
+ brillo::Blob* out_hash) {
return RawHashOfBytes(data.data(), data.size(), out_hash);
}
off_t OmahaHashCalculator::RawHashOfFile(const string& name, off_t length,
- chromeos::Blob* out_hash) {
+ brillo::Blob* out_hash) {
OmahaHashCalculator calc;
off_t res = calc.UpdateFile(name, length);
if (res < 0) {
@@ -127,7 +127,7 @@
return OmahaHashOfBytes(str.data(), str.size());
}
-string OmahaHashCalculator::OmahaHashOfData(const chromeos::Blob& data) {
+string OmahaHashCalculator::OmahaHashOfData(const brillo::Blob& data) {
return OmahaHashOfBytes(data.data(), data.size());
}
diff --git a/omaha_hash_calculator.h b/omaha_hash_calculator.h
index 44340b0..db2ce94 100644
--- a/omaha_hash_calculator.h
+++ b/omaha_hash_calculator.h
@@ -25,7 +25,7 @@
#include <base/logging.h>
#include <base/macros.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
// Omaha uses base64 encoded SHA-256 as the hash. This class provides a simple
// wrapper around OpenSSL providing such a formatted hash of data passed in.
@@ -61,7 +61,7 @@
return hash_;
}
- const chromeos::Blob& raw_hash() const {
+ const brillo::Blob& raw_hash() const {
DCHECK(!raw_hash_.empty()) << "Call Finalize() first";
return raw_hash_;
}
@@ -77,22 +77,22 @@
static bool RawHashOfBytes(const void* data,
size_t length,
- chromeos::Blob* out_hash);
- static bool RawHashOfData(const chromeos::Blob& data,
- chromeos::Blob* out_hash);
+ brillo::Blob* out_hash);
+ static bool RawHashOfData(const brillo::Blob& data,
+ brillo::Blob* out_hash);
static off_t RawHashOfFile(const std::string& name, off_t length,
- chromeos::Blob* out_hash);
+ brillo::Blob* out_hash);
// Used by tests
static std::string OmahaHashOfBytes(const void* data, size_t length);
static std::string OmahaHashOfString(const std::string& str);
- static std::string OmahaHashOfData(const chromeos::Blob& data);
+ static std::string OmahaHashOfData(const brillo::Blob& data);
private:
// If non-empty, the final base64 encoded hash and the raw hash. Will only be
// set to non-empty when Finalize is called.
std::string hash_;
- chromeos::Blob raw_hash_;
+ brillo::Blob raw_hash_;
// Init success
bool valid_;
diff --git a/omaha_hash_calculator_unittest.cc b/omaha_hash_calculator_unittest.cc
index e5f797f..5032aa4 100644
--- a/omaha_hash_calculator_unittest.cc
+++ b/omaha_hash_calculator_unittest.cc
@@ -22,7 +22,7 @@
#include <string>
#include <vector>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include <gtest/gtest.h>
#include "update_engine/libcurl_http_fetcher.h"
@@ -54,8 +54,8 @@
calc.Update("hi", 2);
calc.Finalize();
EXPECT_EQ(kExpectedHash, calc.hash());
- chromeos::Blob raw_hash(std::begin(kExpectedRawHash),
- std::end(kExpectedRawHash));
+ brillo::Blob raw_hash(std::begin(kExpectedRawHash),
+ std::end(kExpectedRawHash));
EXPECT_TRUE(raw_hash == calc.raw_hash());
}
@@ -65,8 +65,8 @@
calc.Update("i", 1);
calc.Finalize();
EXPECT_EQ(kExpectedHash, calc.hash());
- chromeos::Blob raw_hash(std::begin(kExpectedRawHash),
- std::end(kExpectedRawHash));
+ brillo::Blob raw_hash(std::begin(kExpectedRawHash),
+ std::end(kExpectedRawHash));
EXPECT_TRUE(raw_hash == calc.raw_hash());
}
@@ -80,8 +80,8 @@
calc_next.Update("i", 1);
calc_next.Finalize();
EXPECT_EQ(kExpectedHash, calc_next.hash());
- chromeos::Blob raw_hash(std::begin(kExpectedRawHash),
- std::end(kExpectedRawHash));
+ brillo::Blob raw_hash(std::begin(kExpectedRawHash),
+ std::end(kExpectedRawHash));
EXPECT_TRUE(raw_hash == calc_next.raw_hash());
}
@@ -123,8 +123,8 @@
EXPECT_EQ(2, calc.UpdateFile(data_path, kLengths[i]));
EXPECT_TRUE(calc.Finalize());
EXPECT_EQ(kExpectedHash, calc.hash());
- chromeos::Blob raw_hash(std::begin(kExpectedRawHash),
- std::end(kExpectedRawHash));
+ brillo::Blob raw_hash(std::begin(kExpectedRawHash),
+ std::end(kExpectedRawHash));
EXPECT_TRUE(raw_hash == calc.raw_hash());
}
@@ -145,9 +145,9 @@
static const int kLengths[] = { -1, 2, 10 };
for (size_t i = 0; i < arraysize(kLengths); i++) {
- chromeos::Blob exp_raw_hash(std::begin(kExpectedRawHash),
- std::end(kExpectedRawHash));
- chromeos::Blob raw_hash;
+ brillo::Blob exp_raw_hash(std::begin(kExpectedRawHash),
+ std::end(kExpectedRawHash));
+ brillo::Blob raw_hash;
EXPECT_EQ(2, OmahaHashCalculator::RawHashOfFile(data_path,
kLengths[i],
&raw_hash));
diff --git a/omaha_request_action.h b/omaha_request_action.h
index ec71238..f1b81ec 100644
--- a/omaha_request_action.h
+++ b/omaha_request_action.h
@@ -25,7 +25,7 @@
#include <string>
#include <vector>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include <curl/curl.h>
#include "update_engine/action.h"
@@ -311,7 +311,7 @@
bool ping_only_;
// Stores the response from the omaha server
- chromeos::Blob response_buffer_;
+ brillo::Blob response_buffer_;
// Initialized by InitPingDays to values that may be sent to Omaha
// as part of a ping message. Note that only positive values and -1
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 55eb02f..4f444c5 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -26,10 +26,10 @@
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
#include <base/time/time.h>
-#include <chromeos/bind_lambda.h>
-#include <chromeos/message_loops/fake_message_loop.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/bind_lambda.h>
+#include <brillo/message_loops/fake_message_loop.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <gtest/gtest.h>
#include "update_engine/action_pipe.h"
@@ -182,7 +182,7 @@
metrics::CheckReaction expected_check_reaction,
metrics::DownloadErrorCode expected_download_error_code,
OmahaResponse* out_response,
- chromeos::Blob* out_post_data);
+ brillo::Blob* out_post_data);
// Runs and checks a ping test. |ping_only| indicates whether it should send
// only a ping or also an updatecheck.
@@ -240,7 +240,7 @@
}
void ProcessingDone(const ActionProcessor* processor,
ErrorCode code) override {
- chromeos::MessageLoop::current()->BreakLoop();
+ brillo::MessageLoop::current()->BreakLoop();
}
void ActionCompleted(ActionProcessor* processor,
@@ -300,8 +300,8 @@
metrics::CheckReaction expected_check_reaction,
metrics::DownloadErrorCode expected_download_error_code,
OmahaResponse* out_response,
- chromeos::Blob* out_post_data) {
- chromeos::FakeMessageLoop loop(nullptr);
+ brillo::Blob* out_post_data) {
+ brillo::FakeMessageLoop loop(nullptr);
loop.SetAsCurrent();
MockHttpFetcher* fetcher = new MockHttpFetcher(http_response.data(),
http_response.size(),
@@ -362,8 +362,8 @@
void TestEvent(OmahaRequestParams params,
OmahaEvent* event,
const string& http_response,
- chromeos::Blob* out_post_data) {
- chromeos::FakeMessageLoop loop(nullptr);
+ brillo::Blob* out_post_data) {
+ brillo::FakeMessageLoop loop(nullptr);
loop.SetAsCurrent();
MockHttpFetcher* fetcher = new MockHttpFetcher(http_response.data(),
http_response.size(),
@@ -829,7 +829,7 @@
TEST_F(OmahaRequestActionTest, NoOutputPipeTest) {
const string http_response(fake_update_response_.GetNoUpdateResponse());
- chromeos::FakeMessageLoop loop(nullptr);
+ brillo::FakeMessageLoop loop(nullptr);
loop.SetAsCurrent();
OmahaRequestParams params = request_params_;
@@ -987,7 +987,7 @@
class TerminateEarlyTestProcessorDelegate : public ActionProcessorDelegate {
public:
void ProcessingStopped(const ActionProcessor* processor) {
- chromeos::MessageLoop::current()->BreakLoop();
+ brillo::MessageLoop::current()->BreakLoop();
}
};
@@ -999,7 +999,7 @@
} // namespace
TEST_F(OmahaRequestActionTest, TerminateTransferTest) {
- chromeos::FakeMessageLoop loop(nullptr);
+ brillo::FakeMessageLoop loop(nullptr);
loop.SetAsCurrent();
string http_response("doesn't matter");
@@ -1040,7 +1040,7 @@
}
TEST_F(OmahaRequestActionTest, XmlEncodeIsUsedForParams) {
- chromeos::Blob post_data;
+ brillo::Blob post_data;
// Make sure XML Encode is being called on the params
OmahaRequestParams params(&fake_system_state_,
@@ -1136,7 +1136,7 @@
}
TEST_F(OmahaRequestActionTest, FormatUpdateCheckOutputTest) {
- chromeos::Blob post_data;
+ brillo::Blob post_data;
NiceMock<MockPrefs> prefs;
fake_system_state_.set_prefs(&prefs);
@@ -1169,7 +1169,7 @@
TEST_F(OmahaRequestActionTest, FormatSuccessEventOutputTest) {
- chromeos::Blob post_data;
+ brillo::Blob post_data;
TestEvent(request_params_,
new OmahaEvent(OmahaEvent::kTypeUpdateDownloadStarted),
"invalid xml>",
@@ -1186,7 +1186,7 @@
}
TEST_F(OmahaRequestActionTest, FormatErrorEventOutputTest) {
- chromeos::Blob post_data;
+ brillo::Blob post_data;
TestEvent(request_params_,
new OmahaEvent(OmahaEvent::kTypeDownloadComplete,
OmahaEvent::kResultError,
@@ -1235,7 +1235,7 @@
for (int i = 0; i < 2; i++) {
bool delta_okay = i == 1;
const char* delta_okay_str = delta_okay ? "true" : "false";
- chromeos::Blob post_data;
+ brillo::Blob post_data;
OmahaRequestParams params(&fake_system_state_,
constants::kOmahaPlatformName,
OmahaRequestParams::kOsVersion,
@@ -1275,7 +1275,7 @@
for (int i = 0; i < 2; i++) {
bool interactive = i == 1;
const char* interactive_str = interactive ? "ondemandupdate" : "scheduler";
- chromeos::Blob post_data;
+ brillo::Blob post_data;
FakeSystemState fake_system_state;
OmahaRequestParams params(&fake_system_state_,
constants::kOmahaPlatformName,
@@ -1348,7 +1348,7 @@
.WillOnce(DoAll(SetArgumentPointee<1>(six_days_ago), Return(true)));
EXPECT_CALL(prefs, GetInt64(kPrefsLastRollCallPingDay, _))
.WillOnce(DoAll(SetArgumentPointee<1>(five_days_ago), Return(true)));
- chromeos::Blob post_data;
+ brillo::Blob post_data;
ASSERT_TRUE(
TestUpdateCheck(nullptr, // request_params
fake_update_response_.GetNoUpdateResponse(),
@@ -1395,7 +1395,7 @@
.WillOnce(DoAll(SetArgumentPointee<1>(three_days_ago), Return(true)));
EXPECT_CALL(prefs, GetInt64(kPrefsLastRollCallPingDay, _))
.WillOnce(DoAll(SetArgumentPointee<1>(now), Return(true)));
- chromeos::Blob post_data;
+ brillo::Blob post_data;
ASSERT_TRUE(
TestUpdateCheck(nullptr, // request_params
fake_update_response_.GetNoUpdateResponse(),
@@ -1427,7 +1427,7 @@
.WillOnce(DoAll(SetArgumentPointee<1>(now), Return(true)));
EXPECT_CALL(prefs, GetInt64(kPrefsLastRollCallPingDay, _))
.WillOnce(DoAll(SetArgumentPointee<1>(four_days_ago), Return(true)));
- chromeos::Blob post_data;
+ brillo::Blob post_data;
ASSERT_TRUE(
TestUpdateCheck(nullptr, // request_params
fake_update_response_.GetNoUpdateResponse(),
@@ -1464,7 +1464,7 @@
.WillOnce(Return(true));
EXPECT_CALL(prefs, SetInt64(kPrefsLastRollCallPingDay, _))
.WillOnce(Return(true));
- chromeos::Blob post_data;
+ brillo::Blob post_data;
ASSERT_TRUE(
TestUpdateCheck(nullptr, // request_params
fake_update_response_.GetNoUpdateResponse(),
@@ -1491,7 +1491,7 @@
.WillOnce(DoAll(SetArgumentPointee<1>(now), Return(true)));
EXPECT_CALL(prefs, SetInt64(kPrefsLastActivePingDay, _)).Times(0);
EXPECT_CALL(prefs, SetInt64(kPrefsLastRollCallPingDay, _)).Times(0);
- chromeos::Blob post_data;
+ brillo::Blob post_data;
EXPECT_TRUE(
TestUpdateCheck(nullptr, // request_params
fake_update_response_.GetNoUpdateResponse(),
@@ -1524,7 +1524,7 @@
.WillOnce(Return(true));
EXPECT_CALL(prefs, SetInt64(kPrefsLastRollCallPingDay, _))
.WillOnce(Return(true));
- chromeos::Blob post_data;
+ brillo::Blob post_data;
ASSERT_TRUE(
TestUpdateCheck(nullptr, // request_params
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><response "
@@ -1625,7 +1625,7 @@
}
TEST_F(OmahaRequestActionTest, NoUniqueIDTest) {
- chromeos::Blob post_data;
+ brillo::Blob post_data;
ASSERT_FALSE(TestUpdateCheck(nullptr, // request_params
"invalid xml>",
-1,
@@ -1760,7 +1760,7 @@
ASSERT_EQ(0, System(string("mkdir -p ") + test_dir + "/etc"));
ASSERT_EQ(0, System(string("mkdir -p ") + test_dir +
kStatefulPartition + "/etc"));
- chromeos::Blob post_data;
+ brillo::Blob post_data;
NiceMock<MockPrefs> prefs;
fake_system_state_.set_prefs(&prefs);
ASSERT_TRUE(WriteFileString(
@@ -1809,7 +1809,7 @@
ASSERT_EQ(0, System(string("mkdir -p ") + test_dir + "/etc"));
ASSERT_EQ(0, System(string("mkdir -p ") + test_dir +
kStatefulPartition + "/etc"));
- chromeos::Blob post_data;
+ brillo::Blob post_data;
NiceMock<MockPrefs> prefs;
fake_system_state_.set_prefs(&prefs);
ASSERT_TRUE(WriteFileString(
@@ -1855,7 +1855,7 @@
// Flag that the device was powerwashed in the past.
fake_system_state_.fake_hardware()->SetPowerwashCount(1);
- chromeos::Blob post_data;
+ brillo::Blob post_data;
ASSERT_TRUE(
TestUpdateCheck(nullptr, // request_params
fake_update_response_.GetNoUpdateResponse(),
diff --git a/omaha_request_params.cc b/omaha_request_params.cc
index 4118a11..474f192 100644
--- a/omaha_request_params.cc
+++ b/omaha_request_params.cc
@@ -26,7 +26,7 @@
#include <base/files/file_util.h>
#include <base/strings/string_util.h>
-#include <chromeos/key_value_store.h>
+#include <brillo/key_value_store.h>
#include <policy/device_policy.h>
#include "update_engine/constants.h"
@@ -148,7 +148,7 @@
<< ", existing target channel = " << target_channel_
<< ", download channel = " << download_channel_;
TEST_AND_RETURN_FALSE(IsValidChannel(new_target_channel));
- chromeos::KeyValueStore lsb_release;
+ brillo::KeyValueStore lsb_release;
base::FilePath kFile(root_ + kStatefulPartition + "/etc/lsb-release");
lsb_release.Load(kFile);
@@ -232,7 +232,7 @@
it != files.end(); ++it) {
// TODO(adlr): make sure files checked are owned as root (and all their
// parents are recursively, too).
- chromeos::KeyValueStore data;
+ brillo::KeyValueStore data;
if (!data.Load(base::FilePath(root_ + *it)))
continue;
diff --git a/p2p_manager.cc b/p2p_manager.cc
index 3cba737..96aaaaf 100644
--- a/p2p_manager.cc
+++ b/p2p_manager.cc
@@ -58,7 +58,7 @@
using base::StringPrintf;
using base::Time;
using base::TimeDelta;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using chromeos_update_manager::EvalStatus;
using chromeos_update_manager::Policy;
using chromeos_update_manager::UpdateManager;
diff --git a/p2p_manager_unittest.cc b/p2p_manager_unittest.cc
index 05e44c4..98cf366 100644
--- a/p2p_manager_unittest.cc
+++ b/p2p_manager_unittest.cc
@@ -32,10 +32,10 @@
#include <base/files/file_util.h>
#include <base/message_loop/message_loop.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/asynchronous_signal_handler.h>
-#include <chromeos/message_loops/base_message_loop.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/asynchronous_signal_handler.h>
+#include <brillo/message_loops/base_message_loop.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <policy/libpolicy.h>
@@ -50,7 +50,7 @@
#include "update_engine/utils.h"
using base::TimeDelta;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using std::string;
using std::unique_ptr;
using std::vector;
@@ -89,8 +89,8 @@
}
base::MessageLoopForIO base_loop_;
- chromeos::BaseMessageLoop loop_{&base_loop_};
- chromeos::AsynchronousSignalHandler async_signal_handler_;
+ brillo::BaseMessageLoop loop_{&base_loop_};
+ brillo::AsynchronousSignalHandler async_signal_handler_;
Subprocess subprocess_;
// The P2PManager::Configuration instance used for testing.
@@ -111,7 +111,7 @@
EXPECT_CALL(*mock_policy_, P2PEnabledChanged(_, _, _, _, false));
EXPECT_FALSE(manager_->IsP2PEnabled());
- chromeos::MessageLoopRunMaxIterations(MessageLoop::current(), 100);
+ brillo::MessageLoopRunMaxIterations(MessageLoop::current(), 100);
EXPECT_FALSE(manager_->IsP2PEnabled());
}
@@ -126,7 +126,7 @@
EXPECT_CALL(*mock_policy_, P2PEnabledChanged(_, _, _, _, false));
EXPECT_TRUE(manager_->IsP2PEnabled());
- chromeos::MessageLoopRunMaxIterations(MessageLoop::current(), 100);
+ brillo::MessageLoopRunMaxIterations(MessageLoop::current(), 100);
EXPECT_FALSE(manager_->IsP2PEnabled());
}
diff --git a/payload_generator/ab_generator.cc b/payload_generator/ab_generator.cc
index 065408b..5cb0b17 100644
--- a/payload_generator/ab_generator.cc
+++ b/payload_generator/ab_generator.cc
@@ -272,7 +272,7 @@
TEST_AND_RETURN_FALSE(aop->op.type() == InstallOperation::REPLACE ||
aop->op.type() == InstallOperation::REPLACE_BZ);
- chromeos::Blob data(aop->op.dst_length());
+ brillo::Blob data(aop->op.dst_length());
vector<Extent> dst_extents;
ExtentsToVector(aop->op.dst_extents(), &dst_extents);
TEST_AND_RETURN_FALSE(utils::ReadExtents(target_part_path,
@@ -281,11 +281,11 @@
data.size(),
kBlockSize));
- chromeos::Blob data_bz;
+ brillo::Blob data_bz;
TEST_AND_RETURN_FALSE(BzipCompress(data, &data_bz));
CHECK(!data_bz.empty());
- chromeos::Blob* data_p = nullptr;
+ brillo::Blob* data_p = nullptr;
InstallOperation_Type new_op_type;
if (data_bz.size() < data.size()) {
new_op_type = InstallOperation::REPLACE_BZ;
diff --git a/payload_generator/ab_generator.h b/payload_generator/ab_generator.h
index 7c89ed6..25a7811 100644
--- a/payload_generator/ab_generator.h
+++ b/payload_generator/ab_generator.h
@@ -21,7 +21,7 @@
#include <vector>
#include <base/macros.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/payload_constants.h"
#include "update_engine/payload_generator/blob_file_writer.h"
diff --git a/payload_generator/ab_generator_unittest.cc b/payload_generator/ab_generator_unittest.cc
index 77e2e24..cd4ee0a 100644
--- a/payload_generator/ab_generator_unittest.cc
+++ b/payload_generator/ab_generator_unittest.cc
@@ -59,7 +59,7 @@
"SplitReplaceOrReplaceBzTest_part.XXXXXX", &part_path, nullptr));
ScopedPathUnlinker part_path_unlinker(part_path);
const size_t part_size = part_num_blocks * kBlockSize;
- chromeos::Blob part_data;
+ brillo::Blob part_data;
if (compressible) {
part_data.resize(part_size);
test_utils::FillWithData(&part_data);
@@ -85,14 +85,14 @@
op_ex2_num_blocks);
op.set_dst_length(op_ex1_num_blocks + op_ex2_num_blocks);
- chromeos::Blob op_data;
+ brillo::Blob op_data;
op_data.insert(op_data.end(),
part_data.begin() + op_ex1_offset,
part_data.begin() + op_ex1_offset + op_ex1_size);
op_data.insert(op_data.end(),
part_data.begin() + op_ex2_offset,
part_data.begin() + op_ex2_offset + op_ex2_size);
- chromeos::Blob op_blob;
+ brillo::Blob op_blob;
if (orig_type == InstallOperation::REPLACE) {
op_blob = op_data;
} else {
@@ -137,10 +137,10 @@
EXPECT_TRUE(ExtentEquals(first_op.dst_extents(0), op_ex1_start_block,
op_ex1_num_blocks));
// Obtain the expected blob.
- chromeos::Blob first_expected_data(
+ brillo::Blob first_expected_data(
part_data.begin() + op_ex1_offset,
part_data.begin() + op_ex1_offset + op_ex1_size);
- chromeos::Blob first_expected_blob;
+ brillo::Blob first_expected_blob;
if (compressible) {
ASSERT_TRUE(BzipCompress(first_expected_data, &first_expected_blob));
} else {
@@ -148,7 +148,7 @@
}
EXPECT_EQ(first_expected_blob.size(), first_op.data_length());
// Check that the actual blob matches what's expected.
- chromeos::Blob first_data_blob(first_op.data_length());
+ brillo::Blob first_data_blob(first_op.data_length());
ssize_t bytes_read;
ASSERT_TRUE(utils::PReadAll(data_fd,
first_data_blob.data(),
@@ -166,10 +166,10 @@
EXPECT_TRUE(ExtentEquals(second_op.dst_extents(0), op_ex2_start_block,
op_ex2_num_blocks));
// Obtain the expected blob.
- chromeos::Blob second_expected_data(
+ brillo::Blob second_expected_data(
part_data.begin() + op_ex2_offset,
part_data.begin() + op_ex2_offset + op_ex2_size);
- chromeos::Blob second_expected_blob;
+ brillo::Blob second_expected_blob;
if (compressible) {
ASSERT_TRUE(BzipCompress(second_expected_data, &second_expected_blob));
} else {
@@ -177,7 +177,7 @@
}
EXPECT_EQ(second_expected_blob.size(), second_op.data_length());
// Check that the actual blob matches what's expected.
- chromeos::Blob second_data_blob(second_op.data_length());
+ brillo::Blob second_data_blob(second_op.data_length());
ASSERT_TRUE(utils::PReadAll(data_fd,
second_data_blob.data(),
second_op.data_length(),
@@ -210,7 +210,7 @@
"MergeReplaceOrReplaceBzTest_part.XXXXXX", &part_path, nullptr));
ScopedPathUnlinker part_path_unlinker(part_path);
const size_t part_size = part_num_blocks * kBlockSize;
- chromeos::Blob part_data;
+ brillo::Blob part_data;
if (compressible) {
part_data.resize(part_size);
test_utils::FillWithData(&part_data);
@@ -225,7 +225,7 @@
// Create original operations and blob data.
vector<AnnotatedOperation> aops;
- chromeos::Blob blob_data;
+ brillo::Blob blob_data;
const size_t total_op_size = total_op_num_blocks * kBlockSize;
InstallOperation first_op;
@@ -233,9 +233,9 @@
const size_t first_op_size = first_op_num_blocks * kBlockSize;
first_op.set_dst_length(first_op_size);
*(first_op.add_dst_extents()) = ExtentForRange(0, first_op_num_blocks);
- chromeos::Blob first_op_data(part_data.begin(),
+ brillo::Blob first_op_data(part_data.begin(),
part_data.begin() + first_op_size);
- chromeos::Blob first_op_blob;
+ brillo::Blob first_op_blob;
if (orig_type == InstallOperation::REPLACE) {
first_op_blob = first_op_data;
} else {
@@ -255,9 +255,9 @@
second_op.set_dst_length(second_op_size);
*(second_op.add_dst_extents()) = ExtentForRange(first_op_num_blocks,
second_op_num_blocks);
- chromeos::Blob second_op_data(part_data.begin() + first_op_size,
+ brillo::Blob second_op_data(part_data.begin() + first_op_size,
part_data.begin() + total_op_size);
- chromeos::Blob second_op_blob;
+ brillo::Blob second_op_blob;
if (orig_type == InstallOperation::REPLACE) {
second_op_blob = second_op_data;
} else {
@@ -302,9 +302,9 @@
EXPECT_EQ("first,second", aops[0].name);
// Check to see if the blob pointed to in the new extent has what we expect.
- chromeos::Blob expected_data(part_data.begin(),
+ brillo::Blob expected_data(part_data.begin(),
part_data.begin() + total_op_size);
- chromeos::Blob expected_blob;
+ brillo::Blob expected_blob;
if (compressible) {
ASSERT_TRUE(BzipCompress(expected_data, &expected_blob));
} else {
@@ -312,7 +312,7 @@
}
ASSERT_EQ(expected_blob.size(), new_op.data_length());
ASSERT_EQ(blob_data.size() + expected_blob.size(), data_file_size);
- chromeos::Blob new_op_blob(new_op.data_length());
+ brillo::Blob new_op_blob(new_op.data_length());
ssize_t bytes_read;
ASSERT_TRUE(utils::PReadAll(data_fd,
new_op_blob.data(),
diff --git a/payload_generator/annotated_operation.cc b/payload_generator/annotated_operation.cc
index ca900ce..3331303 100644
--- a/payload_generator/annotated_operation.cc
+++ b/payload_generator/annotated_operation.cc
@@ -36,7 +36,7 @@
}
} // namespace
-bool AnnotatedOperation::SetOperationBlob(chromeos::Blob* blob,
+bool AnnotatedOperation::SetOperationBlob(brillo::Blob* blob,
BlobFileWriter* blob_file) {
off_t data_offset = blob_file->StoreBlob(*blob);
TEST_AND_RETURN_FALSE(data_offset != -1);
diff --git a/payload_generator/annotated_operation.h b/payload_generator/annotated_operation.h
index 08a0d0b..4076070 100644
--- a/payload_generator/annotated_operation.h
+++ b/payload_generator/annotated_operation.h
@@ -20,7 +20,7 @@
#include <ostream> // NOLINT(readability/streams)
#include <string>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/payload_generator/blob_file_writer.h"
#include "update_engine/update_metadata.pb.h"
@@ -38,7 +38,7 @@
// Writes |blob| to the end of |data_fd|, and updates |data_file_size| to
// match the new size of |data_fd|. It sets the data_offset and data_length
// in AnnotatedOperation to match the offset and size of |blob| in |data_fd|.
- bool SetOperationBlob(chromeos::Blob* blob, BlobFileWriter* blob_file);
+ bool SetOperationBlob(brillo::Blob* blob, BlobFileWriter* blob_file);
};
// For logging purposes.
diff --git a/payload_generator/blob_file_writer.cc b/payload_generator/blob_file_writer.cc
index f6dcda7..ab57f6f 100644
--- a/payload_generator/blob_file_writer.cc
+++ b/payload_generator/blob_file_writer.cc
@@ -20,7 +20,7 @@
namespace chromeos_update_engine {
-off_t BlobFileWriter::StoreBlob(const chromeos::Blob& blob) {
+off_t BlobFileWriter::StoreBlob(const brillo::Blob& blob) {
base::AutoLock auto_lock(blob_mutex_);
if (!utils::PWriteAll(blob_fd_, blob.data(), blob.size(), *blob_file_size_))
return -1;
diff --git a/payload_generator/blob_file_writer.h b/payload_generator/blob_file_writer.h
index c850963..6ae1a3f 100644
--- a/payload_generator/blob_file_writer.h
+++ b/payload_generator/blob_file_writer.h
@@ -20,7 +20,7 @@
#include <base/macros.h>
#include <base/synchronization/lock.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
namespace chromeos_update_engine {
@@ -34,7 +34,7 @@
// Store the passed |blob| in the blob file. Returns the offset at which it
// was stored, or -1 in case of failure.
- off_t StoreBlob(const chromeos::Blob& blob);
+ off_t StoreBlob(const brillo::Blob& blob);
// The number of |total_blobs| is the number of blobs that will be stored but
// is only used for logging purposes. If not set, logging will be skipped.
diff --git a/payload_generator/blob_file_writer_unittest.cc b/payload_generator/blob_file_writer_unittest.cc
index 3e11b28..ff2a23c 100644
--- a/payload_generator/blob_file_writer_unittest.cc
+++ b/payload_generator/blob_file_writer_unittest.cc
@@ -40,12 +40,12 @@
BlobFileWriter blob_file(blob_fd, &blob_file_size);
off_t blob_size = 1024;
- chromeos::Blob blob(blob_size);
+ brillo::Blob blob(blob_size);
FillWithData(&blob);
EXPECT_EQ(0, blob_file.StoreBlob(blob));
EXPECT_EQ(blob_size, blob_file.StoreBlob(blob));
- chromeos::Blob stored_blob(blob_size);
+ brillo::Blob stored_blob(blob_size);
ssize_t bytes_read;
ASSERT_TRUE(utils::PReadAll(blob_fd,
stored_blob.data(),
diff --git a/payload_generator/block_mapping.cc b/payload_generator/block_mapping.cc
index a2b641f..81ad4bb 100644
--- a/payload_generator/block_mapping.cc
+++ b/payload_generator/block_mapping.cc
@@ -31,7 +31,7 @@
namespace {
-size_t HashValue(const chromeos::Blob& blob) {
+size_t HashValue(const brillo::Blob& blob) {
std::hash<string> hash_fn;
return hash_fn(string(blob.begin(), blob.end()));
}
@@ -40,12 +40,12 @@
namespace chromeos_update_engine {
-BlockMapping::BlockId BlockMapping::AddBlock(const chromeos::Blob& block_data) {
+BlockMapping::BlockId BlockMapping::AddBlock(const brillo::Blob& block_data) {
return AddBlock(-1, 0, block_data);
}
BlockMapping::BlockId BlockMapping::AddDiskBlock(int fd, off_t byte_offset) {
- chromeos::Blob blob(block_size_);
+ brillo::Blob blob(block_size_);
ssize_t bytes_read = 0;
if (!utils::PReadAll(fd, blob.data(), block_size_, byte_offset, &bytes_read))
return -1;
@@ -70,7 +70,7 @@
BlockMapping::BlockId BlockMapping::AddBlock(int fd,
off_t byte_offset,
- const chromeos::Blob& block_data) {
+ const brillo::Blob& block_data) {
if (block_data.size() != block_size_)
return -1;
size_t h = HashValue(block_data);
@@ -110,14 +110,14 @@
return new_ublock->block_id;
}
-bool BlockMapping::UniqueBlock::CompareData(const chromeos::Blob& other_block,
+bool BlockMapping::UniqueBlock::CompareData(const brillo::Blob& other_block,
bool* equals) {
if (!block_data.empty()) {
*equals = block_data == other_block;
return true;
}
const size_t block_size = other_block.size();
- chromeos::Blob blob(block_size);
+ brillo::Blob blob(block_size);
ssize_t bytes_read = 0;
if (!utils::PReadAll(fd, blob.data(), block_size, byte_offset, &bytes_read))
return false;
@@ -144,7 +144,7 @@
vector<BlockMapping::BlockId>* old_block_ids,
vector<BlockMapping::BlockId>* new_block_ids) {
BlockMapping mapping(block_size);
- if (mapping.AddBlock(chromeos::Blob(block_size, '\0')) != 0)
+ if (mapping.AddBlock(brillo::Blob(block_size, '\0')) != 0)
return false;
int old_fd = HANDLE_EINTR(open(old_part.c_str(), O_RDONLY));
int new_fd = HANDLE_EINTR(open(new_part.c_str(), O_RDONLY));
diff --git a/payload_generator/block_mapping.h b/payload_generator/block_mapping.h
index 027d777..3fe94ab 100644
--- a/payload_generator/block_mapping.h
+++ b/payload_generator/block_mapping.h
@@ -21,14 +21,14 @@
#include <string>
#include <vector>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
#include "update_engine/payload_generator/payload_generation_config.h"
namespace chromeos_update_engine {
-// BlockMapping allows to map data blocks (chromeos::Blobs of block_size size)
+// BlockMapping allows to map data blocks (brillo::Blobs of block_size size)
// into unique integer values called "block ids". This mapping differs from a
// hash function in that two blocks with the same data will have the same id but
// also two blocks with the same id will have the same data. This is only valid
@@ -41,7 +41,7 @@
// Add a single data block to the mapping. Returns its unique block id.
// In case of error returns -1.
- BlockId AddBlock(const chromeos::Blob& block_data);
+ BlockId AddBlock(const brillo::Blob& block_data);
// Add a block from disk reading it from the file descriptor |fd| from the
// offset in bytes |byte_offset|. The data block may or may not be cached, so
@@ -62,7 +62,7 @@
// Add a single block passed in |block_data|. If |fd| is not -1, the block
// can be discarded to save RAM and retrieved later from |fd| at the position
// |byte_offset|.
- BlockId AddBlock(int fd, off_t byte_offset, const chromeos::Blob& block_data);
+ BlockId AddBlock(int fd, off_t byte_offset, const brillo::Blob& block_data);
size_t block_size_;
@@ -71,7 +71,7 @@
// The UniqueBlock represents the data of a block associated to a unique
// block id.
struct UniqueBlock {
- chromeos::Blob block_data;
+ brillo::Blob block_data;
// The block id assigned to this unique block.
BlockId block_id;
@@ -86,7 +86,7 @@
// Compares the UniqueBlock data with the other_block data and stores if
// they are equal in |equals|. Returns whether there was an error reading
// the block from disk while comparing it.
- bool CompareData(const chromeos::Blob& other_block, bool* equals);
+ bool CompareData(const brillo::Blob& other_block, bool* equals);
};
// A mapping from hash values to possible block ids.
diff --git a/payload_generator/block_mapping_unittest.cc b/payload_generator/block_mapping_unittest.cc
index a5be5b7..61080f2 100644
--- a/payload_generator/block_mapping_unittest.cc
+++ b/payload_generator/block_mapping_unittest.cc
@@ -62,7 +62,7 @@
};
TEST_F(BlockMappingTest, FirstAddedBlockIsZero) {
- chromeos::Blob blob(block_size_);
+ brillo::Blob blob(block_size_);
// The BlockMapping just assigns the block ids in order, so it doesn't matter
// what are the contents of the first block.
blob[0] = 42;
@@ -86,7 +86,7 @@
}
}
- chromeos::Blob block(block_size_, 'a');
+ brillo::Blob block(block_size_, 'a');
for (int i = 0; i < 5; ++i) {
// Re-add the same block 5 times.
EXPECT_EQ(0, bm_.AddBlock(block));
diff --git a/payload_generator/delta_diff_utils.cc b/payload_generator/delta_diff_utils.cc
index b567462..583bc79 100644
--- a/payload_generator/delta_diff_utils.cc
+++ b/payload_generator/delta_diff_utils.cc
@@ -417,7 +417,7 @@
ssize_t chunk_blocks,
BlobFileWriter* blob_file,
bool src_ops_allowed) {
- chromeos::Blob data;
+ brillo::Blob data;
InstallOperation operation;
uint64_t total_blocks = BlocksInExtents(new_extents);
@@ -498,12 +498,12 @@
const vector<Extent>& old_extents,
const vector<Extent>& new_extents,
bool bsdiff_allowed,
- chromeos::Blob* out_data,
+ brillo::Blob* out_data,
InstallOperation* out_op,
bool src_ops_allowed) {
InstallOperation operation;
// Data blob that will be written to delta file.
- const chromeos::Blob* data_blob = nullptr;
+ const brillo::Blob* data_blob = nullptr;
// We read blocks from old_extents and write blocks to new_extents.
uint64_t blocks_to_read = BlocksInExtents(old_extents);
@@ -514,7 +514,7 @@
vector<Extent> dst_extents = new_extents;
// Read in bytes from new data.
- chromeos::Blob new_data;
+ brillo::Blob new_data;
TEST_AND_RETURN_FALSE(utils::ReadExtents(new_part,
new_extents,
&new_data,
@@ -528,7 +528,7 @@
data_blob = &new_data;
// Try compressing it with bzip2.
- chromeos::Blob new_data_bz;
+ brillo::Blob new_data_bz;
TEST_AND_RETURN_FALSE(BzipCompress(new_data, &new_data_bz));
CHECK(!new_data_bz.empty());
if (new_data_bz.size() < data_blob->size()) {
@@ -537,9 +537,9 @@
data_blob = &new_data_bz;
}
- chromeos::Blob old_data;
- chromeos::Blob empty_blob;
- chromeos::Blob bsdiff_delta;
+ brillo::Blob old_data;
+ brillo::Blob empty_blob;
+ brillo::Blob bsdiff_delta;
if (blocks_to_read > 0) {
// Read old data.
TEST_AND_RETURN_FALSE(
@@ -571,7 +571,7 @@
TEST_AND_RETURN_FALSE(
BsdiffFiles(old_chunk.value(), new_chunk.value(), &bsdiff_delta));
- CHECK_GT(bsdiff_delta.size(), static_cast<chromeos::Blob::size_type>(0));
+ CHECK_GT(bsdiff_delta.size(), static_cast<brillo::Blob::size_type>(0));
if (bsdiff_delta.size() < data_blob->size()) {
if (src_ops_allowed) {
operation.set_type(InstallOperation::SOURCE_BSDIFF);
@@ -614,7 +614,7 @@
// 'out'. Returns true on success.
bool BsdiffFiles(const string& old_file,
const string& new_file,
- chromeos::Blob* out) {
+ brillo::Blob* out) {
const string kPatchFile = "delta.patchXXXXXX";
string patch_file_path;
@@ -628,7 +628,7 @@
cmd.push_back(patch_file_path);
int rc = 1;
- chromeos::Blob patch_file;
+ brillo::Blob patch_file;
TEST_AND_RETURN_FALSE(Subprocess::SynchronousExec(cmd, &rc, nullptr));
TEST_AND_RETURN_FALSE(rc == 0);
TEST_AND_RETURN_FALSE(utils::ReadFile(patch_file_path, out));
@@ -657,7 +657,7 @@
TEST_AND_RETURN_FALSE(hasher.UpdateFile(part.path, part.size) ==
static_cast<off_t>(part.size));
TEST_AND_RETURN_FALSE(hasher.Finalize());
- const chromeos::Blob& hash = hasher.raw_hash();
+ const brillo::Blob& hash = hasher.raw_hash();
info->set_hash(hash.data(), hash.size());
LOG(INFO) << part.path << ": size=" << part.size << " hash=" << hasher.hash();
return true;
diff --git a/payload_generator/delta_diff_utils.h b/payload_generator/delta_diff_utils.h
index dce0793..5ba9bc7 100644
--- a/payload_generator/delta_diff_utils.h
+++ b/payload_generator/delta_diff_utils.h
@@ -20,7 +20,7 @@
#include <string>
#include <vector>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/payload_generator/annotated_operation.h"
#include "update_engine/payload_generator/extent_ranges.h"
@@ -104,7 +104,7 @@
const std::vector<Extent>& old_extents,
const std::vector<Extent>& new_extents,
bool bsdiff_allowed,
- chromeos::Blob* out_data,
+ brillo::Blob* out_data,
InstallOperation* out_op,
bool src_ops_allowed);
@@ -112,7 +112,7 @@
// |out|. Returns true on success.
bool BsdiffFiles(const std::string& old_file,
const std::string& new_file,
- chromeos::Blob* out);
+ brillo::Blob* out);
// Returns true if |op| is a no-op operation that doesn't do any useful work
// (e.g., a move operation that copies blocks onto themselves).
diff --git a/payload_generator/delta_diff_utils_unittest.cc b/payload_generator/delta_diff_utils_unittest.cc
index 6b23197..ce37b27 100644
--- a/payload_generator/delta_diff_utils_unittest.cc
+++ b/payload_generator/delta_diff_utils_unittest.cc
@@ -45,7 +45,7 @@
bool WriteExtents(const string& part_path,
const vector<Extent>& extents,
off_t block_size,
- const chromeos::Blob& data) {
+ const brillo::Blob& data) {
uint64_t offset = 0;
base::ScopedFILE fp(fopen(part_path.c_str(), "r+"));
TEST_AND_RETURN_FALSE(fp.get());
@@ -86,11 +86,11 @@
uint64_t tag) {
TEST_AND_RETURN_FALSE(part.size % block_size == 0);
size_t num_blocks = part.size / block_size;
- chromeos::Blob file_data(part.size);
+ brillo::Blob file_data(part.size);
for (size_t i = 0; i < num_blocks; ++i) {
string prefix = base::StringPrintf(
"block tag 0x%.16" PRIx64 ", block number %16" PRIuS " ", tag, i);
- chromeos::Blob block_data(prefix.begin(), prefix.end());
+ brillo::Blob block_data(prefix.begin(), prefix.end());
TEST_AND_RETURN_FALSE(prefix.size() <= block_size);
block_data.resize(block_size, 'X');
std::copy(block_data.begin(), block_data.end(),
@@ -160,7 +160,7 @@
};
TEST_F(DeltaDiffUtilsTest, MoveSmallTest) {
- chromeos::Blob data_blob(block_size_);
+ brillo::Blob data_blob(block_size_);
test_utils::FillWithData(&data_blob);
// The old file is on a different block than the new one.
@@ -170,7 +170,7 @@
EXPECT_TRUE(WriteExtents(old_part_.path, old_extents, kBlockSize, data_blob));
EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, data_blob));
- chromeos::Blob data;
+ brillo::Blob data;
InstallOperation op;
EXPECT_TRUE(diff_utils::ReadExtentsToDiff(
old_part_.path,
@@ -222,7 +222,7 @@
// The size of the data should match the total number of blocks. Each block
// has a different content.
- chromeos::Blob file_data;
+ brillo::Blob file_data;
for (uint64_t i = 0; i < num_blocks; ++i) {
file_data.resize(file_data.size() + kBlockSize, 'a' + i);
}
@@ -230,7 +230,7 @@
EXPECT_TRUE(WriteExtents(old_part_.path, old_extents, kBlockSize, file_data));
EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, file_data));
- chromeos::Blob data;
+ brillo::Blob data;
InstallOperation op;
EXPECT_TRUE(diff_utils::ReadExtentsToDiff(
old_part_.path,
@@ -282,7 +282,7 @@
TEST_F(DeltaDiffUtilsTest, BsdiffSmallTest) {
// Test a BSDIFF operation from block 1 to block 2.
- chromeos::Blob data_blob(kBlockSize);
+ brillo::Blob data_blob(kBlockSize);
test_utils::FillWithData(&data_blob);
// The old file is on a different block than the new one.
@@ -294,7 +294,7 @@
data_blob[0]++;
EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, data_blob));
- chromeos::Blob data;
+ brillo::Blob data;
InstallOperation op;
EXPECT_TRUE(diff_utils::ReadExtentsToDiff(
old_part_.path,
@@ -324,7 +324,7 @@
TEST_F(DeltaDiffUtilsTest, BsdiffNotAllowedTest) {
// Same setup as the previous test, but this time BSDIFF operations are not
// allowed.
- chromeos::Blob data_blob(kBlockSize);
+ brillo::Blob data_blob(kBlockSize);
test_utils::FillWithData(&data_blob);
// The old file is on a different block than the new one.
@@ -336,7 +336,7 @@
data_blob[0]++;
EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, data_blob));
- chromeos::Blob data;
+ brillo::Blob data;
InstallOperation op;
EXPECT_TRUE(diff_utils::ReadExtentsToDiff(
old_part_.path,
@@ -357,7 +357,7 @@
}
TEST_F(DeltaDiffUtilsTest, BsdiffNotAllowedMoveTest) {
- chromeos::Blob data_blob(kBlockSize);
+ brillo::Blob data_blob(kBlockSize);
test_utils::FillWithData(&data_blob);
// The old file is on a different block than the new one.
@@ -367,7 +367,7 @@
EXPECT_TRUE(WriteExtents(old_part_.path, old_extents, kBlockSize, data_blob));
EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, data_blob));
- chromeos::Blob data;
+ brillo::Blob data;
InstallOperation op;
EXPECT_TRUE(diff_utils::ReadExtentsToDiff(
old_part_.path,
@@ -393,10 +393,10 @@
vector<Extent> new_extents = { ExtentForRange(2, 1) };
// Make a blob that's just 1's that will compress well.
- chromeos::Blob ones(kBlockSize, 1);
+ brillo::Blob ones(kBlockSize, 1);
// Make a blob with random data that won't compress well.
- chromeos::Blob random_data;
+ brillo::Blob random_data;
std::mt19937 gen(12345);
std::uniform_int_distribution<uint8_t> dis(0, 255);
for (uint32_t i = 0; i < kBlockSize; i++) {
@@ -404,12 +404,12 @@
}
for (int i = 0; i < 2; i++) {
- chromeos::Blob data_to_test = i == 0 ? random_data : ones;
+ brillo::Blob data_to_test = i == 0 ? random_data : ones;
// The old_extents will be initialized with 0.
EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize,
data_to_test));
- chromeos::Blob data;
+ brillo::Blob data;
InstallOperation op;
EXPECT_TRUE(diff_utils::ReadExtentsToDiff(
old_part_.path,
@@ -440,7 +440,7 @@
// Makes sure SOURCE_COPY operations are emitted whenever src_ops_allowed
// is true. It is the same setup as MoveSmallTest, which checks that
// the operation is well-formed.
- chromeos::Blob data_blob(kBlockSize);
+ brillo::Blob data_blob(kBlockSize);
test_utils::FillWithData(&data_blob);
// The old file is on a different block than the new one.
@@ -450,7 +450,7 @@
EXPECT_TRUE(WriteExtents(old_part_.path, old_extents, kBlockSize, data_blob));
EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, data_blob));
- chromeos::Blob data;
+ brillo::Blob data;
InstallOperation op;
EXPECT_TRUE(diff_utils::ReadExtentsToDiff(
old_part_.path,
@@ -471,7 +471,7 @@
// Makes sure SOURCE_BSDIFF operations are emitted whenever src_ops_allowed
// is true. It is the same setup as BsdiffSmallTest, which checks
// that the operation is well-formed.
- chromeos::Blob data_blob(kBlockSize);
+ brillo::Blob data_blob(kBlockSize);
test_utils::FillWithData(&data_blob);
// The old file is on a different block than the new one.
@@ -483,7 +483,7 @@
data_blob[0]++;
EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, data_blob));
- chromeos::Blob data;
+ brillo::Blob data;
InstallOperation op;
EXPECT_TRUE(diff_utils::ReadExtentsToDiff(
old_part_.path,
@@ -600,7 +600,7 @@
// Override some of the old blocks with different data.
vector<Extent> different_blocks = {ExtentForRange(40, 5)};
EXPECT_TRUE(WriteExtents(old_part_.path, different_blocks, kBlockSize,
- chromeos::Blob(5 * kBlockSize, 'a')));
+ brillo::Blob(5 * kBlockSize, 'a')));
EXPECT_TRUE(RunDeltaMovedAndZeroBlocks(10, // chunk_blocks
true)); // src_ops_allowed
@@ -642,11 +642,11 @@
new_part_.size = block_size_ * 50;
// Create two identical partitions with 5 copies of the same unique "file".
- chromeos::Blob file_data(block_size_ * 10, 'a');
+ brillo::Blob file_data(block_size_ * 10, 'a');
for (size_t offset = 0; offset < file_data.size(); offset += block_size_)
file_data[offset] = 'a' + offset / block_size_;
- chromeos::Blob partition_data(old_part_.size);
+ brillo::Blob partition_data(old_part_.size);
for (size_t offset = 0; offset < partition_data.size();
offset += file_data.size()) {
std::copy(file_data.begin(), file_data.end(),
@@ -691,7 +691,7 @@
// The last range is split since the old image has zeros in part of it.
ExtentForRange(30, 20),
};
- chromeos::Blob zeros_data(BlocksInExtents(new_zeros) * block_size_, '\0');
+ brillo::Blob zeros_data(BlocksInExtents(new_zeros) * block_size_, '\0');
EXPECT_TRUE(WriteExtents(new_part_.path, new_zeros, block_size_, zeros_data));
vector<Extent> old_zeros = vector<Extent>{ExtentForRange(43, 7)};
@@ -747,7 +747,7 @@
// We initialize the old_part_ with the blocks from new_part but in the
// |permutation| order. Block i in the old_part_ will contain the same data
// as block permutation[i] in the new_part_.
- chromeos::Blob new_contents;
+ brillo::Blob new_contents;
EXPECT_TRUE(utils::ReadFile(new_part_.path, &new_contents));
EXPECT_TRUE(WriteExtents(old_part_.path, perm_extents, block_size_,
new_contents));
diff --git a/payload_generator/ext2_filesystem.cc b/payload_generator/ext2_filesystem.cc
index ff0bc37..182c098 100644
--- a/payload_generator/ext2_filesystem.cc
+++ b/payload_generator/ext2_filesystem.cc
@@ -317,7 +317,7 @@
return true;
}
-bool Ext2Filesystem::LoadSettings(chromeos::KeyValueStore* store) const {
+bool Ext2Filesystem::LoadSettings(brillo::KeyValueStore* store) const {
// First search for the settings inode following symlinks if we find some.
ext2_ino_t ino_num = 0;
errcode_t err = ext2fs_namei_follow(
@@ -339,7 +339,7 @@
if (err != 0)
return false;
- chromeos::Blob blob;
+ brillo::Blob blob;
uint64_t physical_size = BlocksInExtents(extents) * filsys_->blocksize;
// Sparse holes in the settings file are not supported.
if (EXT2_I_SIZE(&ino_data) > physical_size)
diff --git a/payload_generator/ext2_filesystem.h b/payload_generator/ext2_filesystem.h
index afbe524..248e208 100644
--- a/payload_generator/ext2_filesystem.h
+++ b/payload_generator/ext2_filesystem.h
@@ -52,7 +52,7 @@
// and bitmap tables.
bool GetFiles(std::vector<File>* files) const override;
- bool LoadSettings(chromeos::KeyValueStore* store) const override;
+ bool LoadSettings(brillo::KeyValueStore* store) const override;
private:
Ext2Filesystem() = default;
diff --git a/payload_generator/ext2_filesystem_unittest.cc b/payload_generator/ext2_filesystem_unittest.cc
index 628c4e0..fef1c9f 100644
--- a/payload_generator/ext2_filesystem_unittest.cc
+++ b/payload_generator/ext2_filesystem_unittest.cc
@@ -194,7 +194,7 @@
"gen/disk_ext2_1k.img");
unique_ptr<Ext2Filesystem> fs = Ext2Filesystem::CreateFromFile(path.value());
- chromeos::KeyValueStore store;
+ brillo::KeyValueStore store;
// disk_ext2_1k.img doesn't have the /etc/update_engine.conf file.
EXPECT_FALSE(fs->LoadSettings(&store));
}
@@ -204,7 +204,7 @@
"gen/disk_ext2_ue_settings.img");
unique_ptr<Ext2Filesystem> fs = Ext2Filesystem::CreateFromFile(path.value());
- chromeos::KeyValueStore store;
+ brillo::KeyValueStore store;
EXPECT_TRUE(fs->LoadSettings(&store));
string minor_version;
EXPECT_TRUE(store.GetString("PAYLOAD_MINOR_VERSION", &minor_version));
diff --git a/payload_generator/fake_filesystem.cc b/payload_generator/fake_filesystem.cc
index 494792d..3a6458d 100644
--- a/payload_generator/fake_filesystem.cc
+++ b/payload_generator/fake_filesystem.cc
@@ -50,7 +50,7 @@
files_.push_back(file);
}
-bool FakeFilesystem::LoadSettings(chromeos::KeyValueStore* store) const {
+bool FakeFilesystem::LoadSettings(brillo::KeyValueStore* store) const {
if (minor_version_ < 0)
return false;
store->SetString("PAYLOAD_MINOR_VERSION", std::to_string(minor_version_));
diff --git a/payload_generator/fake_filesystem.h b/payload_generator/fake_filesystem.h
index 095f8a8..a14b8d3 100644
--- a/payload_generator/fake_filesystem.h
+++ b/payload_generator/fake_filesystem.h
@@ -38,7 +38,7 @@
size_t GetBlockSize() const override;
size_t GetBlockCount() const override;
bool GetFiles(std::vector<File>* files) const override;
- bool LoadSettings(chromeos::KeyValueStore* store) const override;
+ bool LoadSettings(brillo::KeyValueStore* store) const override;
// Fake methods.
diff --git a/payload_generator/filesystem_interface.h b/payload_generator/filesystem_interface.h
index 56d43ee..866c46b 100644
--- a/payload_generator/filesystem_interface.h
+++ b/payload_generator/filesystem_interface.h
@@ -32,7 +32,7 @@
#include <vector>
#include <base/macros.h>
-#include <chromeos/key_value_store.h>
+#include <brillo/key_value_store.h>
#include "update_engine/update_metadata.pb.h"
@@ -81,7 +81,7 @@
// Load the image settings stored in the filesystem in the
// /etc/update_engine.conf file. Returns whether the settings were found.
- virtual bool LoadSettings(chromeos::KeyValueStore* store) const = 0;
+ virtual bool LoadSettings(brillo::KeyValueStore* store) const = 0;
protected:
FilesystemInterface() = default;
diff --git a/payload_generator/full_update_generator.cc b/payload_generator/full_update_generator.cc
index 7ece2ad..f2db3a8 100644
--- a/payload_generator/full_update_generator.cc
+++ b/payload_generator/full_update_generator.cc
@@ -28,7 +28,7 @@
#include <base/strings/stringprintf.h>
#include <base/synchronization/lock.h>
#include <base/threading/simple_thread.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/bzip.h"
#include "update_engine/utils.h"
@@ -73,7 +73,7 @@
// |blob_file_size| accordingly.
// This method is thread-safe since it uses a mutex to access the file.
// Returns the data offset where the data was written to.
- off_t StoreBlob(const chromeos::Blob& blob);
+ off_t StoreBlob(const brillo::Blob& blob);
// Work parameters.
int fd_;
@@ -93,8 +93,8 @@
}
bool ChunkProcessor::ProcessChunk() {
- chromeos::Blob buffer_in_(size_);
- chromeos::Blob op_blob;
+ brillo::Blob buffer_in_(size_);
+ brillo::Blob op_blob;
ssize_t bytes_read = -1;
TEST_AND_RETURN_FALSE(utils::PReadAll(fd_,
buffer_in_.data(),
diff --git a/payload_generator/full_update_generator_unittest.cc b/payload_generator/full_update_generator_unittest.cc
index 6c1047c..21c23e0 100644
--- a/payload_generator/full_update_generator_unittest.cc
+++ b/payload_generator/full_update_generator_unittest.cc
@@ -71,7 +71,7 @@
};
TEST_F(FullUpdateGeneratorTest, RunTest) {
- chromeos::Blob new_part(9 * 1024 * 1024);
+ brillo::Blob new_part(9 * 1024 * 1024);
FillWithData(&new_part);
new_part_conf.size = new_part.size();
@@ -101,7 +101,7 @@
TEST_F(FullUpdateGeneratorTest, ChunkSizeTooBig) {
config_.hard_chunk_size = 1024 * 1024;
config_.soft_chunk_size = config_.hard_chunk_size;
- chromeos::Blob new_part(1536 * 1024); // 1.5 MiB
+ brillo::Blob new_part(1536 * 1024); // 1.5 MiB
new_part_conf.size = new_part.size();
EXPECT_TRUE(test_utils::WriteFileVector(new_part_conf.path, new_part));
@@ -122,7 +122,7 @@
// Test that if the image size is much smaller than the chunk size, it handles
// correctly the only chunk of the partition.
TEST_F(FullUpdateGeneratorTest, ImageSizeTooSmall) {
- chromeos::Blob new_part(16 * 1024);
+ brillo::Blob new_part(16 * 1024);
new_part_conf.size = new_part.size();
EXPECT_TRUE(test_utils::WriteFileVector(new_part_conf.path, new_part));
diff --git a/payload_generator/generate_delta_main.cc b/payload_generator/generate_delta_main.cc
index cdac82f..5924f06 100644
--- a/payload_generator/generate_delta_main.cc
+++ b/payload_generator/generate_delta_main.cc
@@ -27,7 +27,7 @@
#include <base/logging.h>
#include <base/strings/string_number_conversions.h>
#include <base/strings/string_split.h>
-#include <chromeos/flag_helper.h>
+#include <brillo/flag_helper.h>
#include "update_engine/delta_performer.h"
#include "update_engine/payload_constants.h"
@@ -113,7 +113,7 @@
LOG_IF(FATAL, out_hash_file.empty())
<< "Must pass --out_hash_file to calculate hash for signing.";
- chromeos::Blob hash;
+ brillo::Blob hash;
bool result = PayloadSigner::HashPayloadForSigning(in_file, sizes,
&hash);
CHECK(result);
@@ -133,7 +133,7 @@
LOG_IF(FATAL, out_metadata_hash_file.empty())
<< "Must pass --out_metadata_hash_file to calculate metadata hash.";
- chromeos::Blob hash;
+ brillo::Blob hash;
bool result = PayloadSigner::HashMetadataForSigning(in_file, sizes,
&hash);
CHECK(result);
@@ -156,11 +156,11 @@
<< "Must pass --out_file to sign payload.";
LOG_IF(FATAL, signature_file.empty())
<< "Must pass --signature_file to sign payload.";
- vector<chromeos::Blob> signatures;
+ vector<brillo::Blob> signatures;
vector<string> signature_files;
base::SplitString(signature_file, ':', &signature_files);
for (const string& signature_file : signature_files) {
- chromeos::Blob signature;
+ brillo::Blob signature;
CHECK(utils::ReadFile(signature_file, &signature));
signatures.push_back(signature);
}
@@ -225,7 +225,7 @@
}
DeltaPerformer performer(&prefs, nullptr, &install_plan);
- chromeos::Blob buf(1024 * 1024);
+ brillo::Blob buf(1024 * 1024);
int fd = open(in_file.c_str(), O_RDONLY, 0);
CHECK_GE(fd, 0);
ScopedFdCloser fd_closer(&fd);
@@ -341,7 +341,7 @@
DEFINE_string(new_build_version, "",
"The version of the build containing the new image.");
- chromeos::FlagHelper::Init(argc, argv,
+ brillo::FlagHelper::Init(argc, argv,
"Generates a payload to provide to ChromeOS' update_engine.\n\n"
"This tool can create full payloads and also delta payloads if the src\n"
"image is provided. It also provides debugging options to apply, sign\n"
@@ -499,7 +499,7 @@
// image.
if (payload_config.is_delta) {
payload_config.minor_version = kInPlaceMinorPayloadVersion;
- chromeos::KeyValueStore store;
+ brillo::KeyValueStore store;
uint32_t minor_version;
for (const PartitionConfig& part : payload_config.source.partitions) {
if (part.fs_interface && part.fs_interface->LoadSettings(&store) &&
diff --git a/payload_generator/payload_file.cc b/payload_generator/payload_file.cc
index cdcc967..b376326 100644
--- a/payload_generator/payload_file.cc
+++ b/payload_generator/payload_file.cc
@@ -231,7 +231,7 @@
// Write signature blob.
if (!private_key_path.empty()) {
LOG(INFO) << "Signing the update...";
- chromeos::Blob signature_blob;
+ brillo::Blob signature_blob;
TEST_AND_RETURN_FALSE(PayloadSigner::SignPayload(
payload_file,
vector<string>(1, private_key_path),
@@ -266,7 +266,7 @@
if (!aop.op.has_data_offset())
continue;
CHECK(aop.op.has_data_length());
- chromeos::Blob buf(aop.op.data_length());
+ brillo::Blob buf(aop.op.data_length());
ssize_t rc = pread(in_fd, buf.data(), buf.size(), aop.op.data_offset());
TEST_AND_RETURN_FALSE(rc == static_cast<ssize_t>(buf.size()));
@@ -282,11 +282,11 @@
}
bool PayloadFile::AddOperationHash(InstallOperation* op,
- const chromeos::Blob& buf) {
+ const brillo::Blob& buf) {
OmahaHashCalculator hasher;
TEST_AND_RETURN_FALSE(hasher.Update(buf.data(), buf.size()));
TEST_AND_RETURN_FALSE(hasher.Finalize());
- const chromeos::Blob& hash = hasher.raw_hash();
+ const brillo::Blob& hash = hasher.raw_hash();
op->set_data_sha256_hash(hash.data(), hash.size());
return true;
}
diff --git a/payload_generator/payload_file.h b/payload_generator/payload_file.h
index d877ef7..b586d73 100644
--- a/payload_generator/payload_file.h
+++ b/payload_generator/payload_file.h
@@ -20,7 +20,7 @@
#include <string>
#include <vector>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
#include "update_engine/payload_generator/annotated_operation.h"
@@ -63,7 +63,7 @@
// dummy operation for signature blob because the contents of the signature
// blob will not be available at payload creation time. So, update_engine will
// gracefully ignore the dummy signature operation.
- static bool AddOperationHash(InstallOperation* op, const chromeos::Blob& buf);
+ static bool AddOperationHash(InstallOperation* op, const brillo::Blob& buf);
// Install operations in the manifest may reference data blobs, which
// are in data_blobs_path. This function creates a new data blobs file
diff --git a/payload_generator/payload_signer.cc b/payload_generator/payload_signer.cc
index 4a2bb95..25ead8a 100644
--- a/payload_generator/payload_signer.cc
+++ b/payload_generator/payload_signer.cc
@@ -21,7 +21,7 @@
#include <base/logging.h>
#include <base/strings/string_split.h>
#include <base/strings/string_util.h>
-#include <chromeos/data_encoding.h>
+#include <brillo/data_encoding.h>
#include <openssl/pem.h>
#include "update_engine/omaha_hash_calculator.h"
@@ -45,11 +45,11 @@
// Given raw |signatures|, packs them into a protobuf and serializes it into a
// binary blob. Returns true on success, false otherwise.
-bool ConvertSignatureToProtobufBlob(const vector<chromeos::Blob>& signatures,
- chromeos::Blob* out_signature_blob) {
+bool ConvertSignatureToProtobufBlob(const vector<brillo::Blob>& signatures,
+ brillo::Blob* out_signature_blob) {
// Pack it into a protobuf
Signatures out_message;
- for (const chromeos::Blob& signature : signatures) {
+ for (const brillo::Blob& signature : signatures) {
Signatures_Signature* sig_message = out_message.add_signatures();
// Set all the signatures with the same version number.
sig_message->set_version(kSignatureMessageLegacyVersion);
@@ -74,14 +74,14 @@
// true on success, false otherwise.
bool AddSignatureOpToPayload(const string& payload_path,
uint64_t signature_blob_size,
- chromeos::Blob* out_payload,
+ brillo::Blob* out_payload,
uint64_t* out_metadata_size,
uint64_t* out_signatures_offset) {
const int kProtobufOffset = 20;
const int kProtobufSizeOffset = 12;
// Loads the payload.
- chromeos::Blob payload;
+ brillo::Blob payload;
DeltaArchiveManifest manifest;
uint64_t metadata_size;
TEST_AND_RETURN_FALSE(PayloadVerifier::LoadPayload(
@@ -134,9 +134,9 @@
}
} // namespace
-bool PayloadSigner::SignHash(const chromeos::Blob& hash,
+bool PayloadSigner::SignHash(const brillo::Blob& hash,
const string& private_key_path,
- chromeos::Blob* out_signature) {
+ brillo::Blob* out_signature) {
LOG(INFO) << "Signing hash with private key: " << private_key_path;
string sig_path;
TEST_AND_RETURN_FALSE(
@@ -149,7 +149,7 @@
ScopedPathUnlinker hash_path_unlinker(hash_path);
// We expect unpadded SHA256 hash coming in
TEST_AND_RETURN_FALSE(hash.size() == 32);
- chromeos::Blob padded_hash(hash);
+ brillo::Blob padded_hash(hash);
PayloadVerifier::PadRSA2048SHA256Hash(&padded_hash);
TEST_AND_RETURN_FALSE(utils::WriteFile(hash_path.c_str(),
padded_hash.data(),
@@ -164,7 +164,7 @@
nullptr));
TEST_AND_RETURN_FALSE(return_code == 0);
- chromeos::Blob signature;
+ brillo::Blob signature;
TEST_AND_RETURN_FALSE(utils::ReadFile(sig_path, &signature));
out_signature->swap(signature);
return true;
@@ -172,15 +172,15 @@
bool PayloadSigner::SignPayload(const string& unsigned_payload_path,
const vector<string>& private_key_paths,
- chromeos::Blob* out_signature_blob) {
- chromeos::Blob hash_data;
+ brillo::Blob* out_signature_blob) {
+ brillo::Blob hash_data;
TEST_AND_RETURN_FALSE(OmahaHashCalculator::RawHashOfFile(
unsigned_payload_path, -1, &hash_data) ==
utils::FileSize(unsigned_payload_path));
- vector<chromeos::Blob> signatures;
+ vector<brillo::Blob> signatures;
for (const string& path : private_key_paths) {
- chromeos::Blob signature;
+ brillo::Blob signature;
TEST_AND_RETURN_FALSE(SignHash(hash_data, path, &signature));
signatures.push_back(signature);
}
@@ -199,7 +199,7 @@
ScopedPathUnlinker x_path_unlinker(x_path);
TEST_AND_RETURN_FALSE(utils::WriteFile(x_path.c_str(), "x", 1));
- chromeos::Blob sig_blob;
+ brillo::Blob sig_blob;
TEST_AND_RETURN_FALSE(PayloadSigner::SignPayload(x_path,
private_key_paths,
&sig_blob));
@@ -210,17 +210,17 @@
bool PayloadSigner::PrepPayloadForHashing(
const string& payload_path,
const vector<int>& signature_sizes,
- chromeos::Blob* payload_out,
+ brillo::Blob* payload_out,
uint64_t* metadata_size_out,
uint64_t* signatures_offset_out) {
// TODO(petkov): Reduce memory usage -- the payload is manipulated in memory.
// Loads the payload and adds the signature op to it.
- vector<chromeos::Blob> signatures;
+ vector<brillo::Blob> signatures;
for (int signature_size : signature_sizes) {
signatures.emplace_back(signature_size, 0);
}
- chromeos::Blob signature_blob;
+ brillo::Blob signature_blob;
TEST_AND_RETURN_FALSE(ConvertSignatureToProtobufBlob(signatures,
&signature_blob));
TEST_AND_RETURN_FALSE(AddSignatureOpToPayload(payload_path,
@@ -234,8 +234,8 @@
bool PayloadSigner::HashPayloadForSigning(const string& payload_path,
const vector<int>& signature_sizes,
- chromeos::Blob* out_hash_data) {
- chromeos::Blob payload;
+ brillo::Blob* out_hash_data) {
+ brillo::Blob payload;
uint64_t metadata_size;
uint64_t signatures_offset;
@@ -255,8 +255,8 @@
bool PayloadSigner::HashMetadataForSigning(const string& payload_path,
const vector<int>& signature_sizes,
- chromeos::Blob* out_metadata_hash) {
- chromeos::Blob payload;
+ brillo::Blob* out_metadata_hash) {
+ brillo::Blob payload;
uint64_t metadata_size;
uint64_t signatures_offset;
@@ -275,16 +275,16 @@
bool PayloadSigner::AddSignatureToPayload(
const string& payload_path,
- const vector<chromeos::Blob>& signatures,
+ const vector<brillo::Blob>& signatures,
const string& signed_payload_path,
uint64_t *out_metadata_size) {
// TODO(petkov): Reduce memory usage -- the payload is manipulated in memory.
// Loads the payload and adds the signature op to it.
- chromeos::Blob signature_blob;
+ brillo::Blob signature_blob;
TEST_AND_RETURN_FALSE(ConvertSignatureToProtobufBlob(signatures,
&signature_blob));
- chromeos::Blob payload;
+ brillo::Blob payload;
uint64_t signatures_offset;
TEST_AND_RETURN_FALSE(AddSignatureOpToPayload(payload_path,
signature_blob.size(),
@@ -311,17 +311,17 @@
string* out_signature) {
// Calculates the hash on the updated payload. Note that the payload includes
// the signature op but doesn't include the signature blob at the end.
- chromeos::Blob metadata_hash;
+ brillo::Blob metadata_hash;
TEST_AND_RETURN_FALSE(OmahaHashCalculator::RawHashOfBytes(metadata,
metadata_size,
&metadata_hash));
- chromeos::Blob signature;
+ brillo::Blob signature;
TEST_AND_RETURN_FALSE(SignHash(metadata_hash,
private_key_path,
&signature));
- *out_signature = chromeos::data_encoding::Base64Encode(signature);
+ *out_signature = brillo::data_encoding::Base64Encode(signature);
return true;
}
diff --git a/payload_generator/payload_signer.h b/payload_generator/payload_signer.h
index f907a92..11116a3 100644
--- a/payload_generator/payload_signer.h
+++ b/payload_generator/payload_signer.h
@@ -21,7 +21,7 @@
#include <vector>
#include <base/macros.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/update_metadata.pb.h"
@@ -34,9 +34,9 @@
public:
// Given a raw |hash| and a private key in |private_key_path| calculates the
// raw signature in |out_signature|. Returns true on success, false otherwise.
- static bool SignHash(const chromeos::Blob& hash,
+ static bool SignHash(const brillo::Blob& hash,
const std::string& private_key_path,
- chromeos::Blob* out_signature);
+ brillo::Blob* out_signature);
// Given an unsigned payload in |unsigned_payload_path| and private keys in
// |private_key_path|, calculates the signature blob into
@@ -45,7 +45,7 @@
// false otherwise.
static bool SignPayload(const std::string& unsigned_payload_path,
const std::vector<std::string>& private_key_paths,
- chromeos::Blob* out_signature_blob);
+ brillo::Blob* out_signature_blob);
// Returns the length of out_signature_blob that will result in a call
// to SignPayload with the given private keys. Returns true on success.
@@ -59,7 +59,7 @@
static bool PrepPayloadForHashing(
const std::string& payload_path,
const std::vector<int>& signature_sizes,
- chromeos::Blob* payload_out,
+ brillo::Blob* payload_out,
uint64_t* metadata_size_out,
uint64_t* signatures_offset_out);
@@ -74,7 +74,7 @@
// The dummy signatures are not preserved or written to disk.
static bool HashPayloadForSigning(const std::string& payload_path,
const std::vector<int>& signature_sizes,
- chromeos::Blob* out_hash_data);
+ brillo::Blob* out_hash_data);
// Given an unsigned payload in |payload_path|,
// this method does two things:
@@ -88,7 +88,7 @@
// The dummy signatures are not preserved or written to disk.
static bool HashMetadataForSigning(const std::string& payload_path,
const std::vector<int>& signature_sizes,
- chromeos::Blob* out_metadata_hash);
+ brillo::Blob* out_metadata_hash);
// Given an unsigned payload in |payload_path| (with no dummy signature op)
// and the raw |signatures| updates the payload to include the signature thus
@@ -99,7 +99,7 @@
// on success, false otherwise.
static bool AddSignatureToPayload(
const std::string& payload_path,
- const std::vector<chromeos::Blob>& signatures,
+ const std::vector<brillo::Blob>& signatures,
const std::string& signed_payload_path,
uint64_t* out_metadata_size);
diff --git a/payload_generator/payload_signer_unittest.cc b/payload_generator/payload_signer_unittest.cc
index cedb432..9ef6614 100644
--- a/payload_generator/payload_signer_unittest.cc
+++ b/payload_generator/payload_signer_unittest.cc
@@ -94,7 +94,7 @@
};
namespace {
-void SignSampleData(chromeos::Blob* out_signature_blob,
+void SignSampleData(brillo::Blob* out_signature_blob,
const vector<string>& private_keys) {
string data_path;
ASSERT_TRUE(utils::MakeTempFile("data.XXXXXX", &data_path, nullptr));
@@ -119,11 +119,11 @@
PayloadVerifier::PadRSA2048SHA256Hash(&padded_hash_data_);
}
- chromeos::Blob padded_hash_data_{std::begin(kDataHash), std::end(kDataHash)};
+ brillo::Blob padded_hash_data_{std::begin(kDataHash), std::end(kDataHash)};
};
TEST_F(PayloadSignerTest, SignSimpleTextTest) {
- chromeos::Blob signature_blob;
+ brillo::Blob signature_blob;
SignSampleData(&signature_blob, {kUnittestPrivateKeyPath});
// Check the signature itself
@@ -141,7 +141,7 @@
}
TEST_F(PayloadSignerTest, VerifyAllSignatureTest) {
- chromeos::Blob signature_blob;
+ brillo::Blob signature_blob;
SignSampleData(&signature_blob,
{kUnittestPrivateKeyPath, kUnittestPrivateKey2Path});
@@ -155,7 +155,7 @@
}
TEST_F(PayloadSignerTest, VerifySignatureTest) {
- chromeos::Blob signature_blob;
+ brillo::Blob signature_blob;
SignSampleData(&signature_blob, {kUnittestPrivateKeyPath});
EXPECT_TRUE(PayloadVerifier::VerifySignature(signature_blob,
diff --git a/payload_generator/raw_filesystem.h b/payload_generator/raw_filesystem.h
index 7852573..0aecd81 100644
--- a/payload_generator/raw_filesystem.h
+++ b/payload_generator/raw_filesystem.h
@@ -41,7 +41,7 @@
// with the name passed during construction.
bool GetFiles(std::vector<File>* files) const override;
- bool LoadSettings(chromeos::KeyValueStore* store) const override {
+ bool LoadSettings(brillo::KeyValueStore* store) const override {
return false;
}
diff --git a/payload_verifier.cc b/payload_verifier.cc
index f713fb1..b28592a 100644
--- a/payload_verifier.cc
+++ b/payload_verifier.cc
@@ -86,10 +86,10 @@
} // namespace
bool PayloadVerifier::LoadPayload(const string& payload_path,
- chromeos::Blob* out_payload,
+ brillo::Blob* out_payload,
DeltaArchiveManifest* out_manifest,
uint64_t* out_metadata_size) {
- chromeos::Blob payload;
+ brillo::Blob payload;
// Loads the payload and parses the manifest.
TEST_AND_RETURN_FALSE(utils::ReadFile(payload_path, &payload));
LOG(INFO) << "Payload size: " << payload.size();
@@ -106,9 +106,9 @@
return true;
}
-bool PayloadVerifier::VerifySignature(const chromeos::Blob& signature_blob,
+bool PayloadVerifier::VerifySignature(const brillo::Blob& signature_blob,
const string& public_key_path,
- const chromeos::Blob& hash_data) {
+ const brillo::Blob& hash_data) {
TEST_AND_RETURN_FALSE(!public_key_path.empty());
Signatures signatures;
@@ -121,12 +121,12 @@
return false;
}
- std::vector<chromeos::Blob> tested_hashes;
+ std::vector<brillo::Blob> tested_hashes;
// Tries every signature in the signature blob.
for (int i = 0; i < signatures.signatures_size(); i++) {
const Signatures_Signature& signature = signatures.signatures(i);
- chromeos::Blob sig_data(signature.data().begin(), signature.data().end());
- chromeos::Blob sig_hash_data;
+ brillo::Blob sig_data(signature.data().begin(), signature.data().end());
+ brillo::Blob sig_hash_data;
if (!GetRawHashFromSignature(sig_data, public_key_path, &sig_hash_data))
continue;
@@ -149,9 +149,9 @@
bool PayloadVerifier::GetRawHashFromSignature(
- const chromeos::Blob& sig_data,
+ const brillo::Blob& sig_data,
const string& public_key_path,
- chromeos::Blob* out_hash_data) {
+ brillo::Blob* out_hash_data) {
TEST_AND_RETURN_FALSE(!public_key_path.empty());
// The code below executes the equivalent of:
@@ -178,7 +178,7 @@
}
// Decrypts the signature.
- chromeos::Blob hash_data(keysize);
+ brillo::Blob hash_data(keysize);
int decrypt_size = RSA_public_decrypt(sig_data.size(),
sig_data.data(),
hash_data.data(),
@@ -194,7 +194,7 @@
bool PayloadVerifier::VerifySignedPayload(const string& payload_path,
const string& public_key_path) {
- chromeos::Blob payload;
+ brillo::Blob payload;
DeltaArchiveManifest manifest;
uint64_t metadata_size;
TEST_AND_RETURN_FALSE(LoadPayload(
@@ -204,10 +204,10 @@
CHECK_EQ(payload.size(),
metadata_size + manifest.signatures_offset() +
manifest.signatures_size());
- chromeos::Blob signature_blob(
+ brillo::Blob signature_blob(
payload.begin() + metadata_size + manifest.signatures_offset(),
payload.end());
- chromeos::Blob hash;
+ brillo::Blob hash;
TEST_AND_RETURN_FALSE(OmahaHashCalculator::RawHashOfBytes(
payload.data(), metadata_size + manifest.signatures_offset(), &hash));
TEST_AND_RETURN_FALSE(PadRSA2048SHA256Hash(&hash));
@@ -216,7 +216,7 @@
return true;
}
-bool PayloadVerifier::PadRSA2048SHA256Hash(chromeos::Blob* hash) {
+bool PayloadVerifier::PadRSA2048SHA256Hash(brillo::Blob* hash) {
TEST_AND_RETURN_FALSE(hash->size() == 32);
hash->insert(hash->begin(),
reinterpret_cast<const char*>(kRSA2048SHA256Padding),
diff --git a/payload_verifier.h b/payload_verifier.h
index faea31d..43011e5 100644
--- a/payload_verifier.h
+++ b/payload_verifier.h
@@ -21,7 +21,7 @@
#include <vector>
#include <base/macros.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/update_metadata.pb.h"
@@ -37,16 +37,16 @@
// Returns whether *any* of the decrypted hashes matches the |hash_data|.
// In case of any error parsing the signatures or the public key, returns
// false.
- static bool VerifySignature(const chromeos::Blob& signature_blob,
+ static bool VerifySignature(const brillo::Blob& signature_blob,
const std::string& public_key_path,
- const chromeos::Blob& hash_data);
+ const brillo::Blob& hash_data);
// Decrypts sig_data with the given public_key_path and populates
// out_hash_data with the decoded raw hash. Returns true if successful,
// false otherwise.
- static bool GetRawHashFromSignature(const chromeos::Blob& sig_data,
+ static bool GetRawHashFromSignature(const brillo::Blob& sig_data,
const std::string& public_key_path,
- chromeos::Blob* out_hash_data);
+ brillo::Blob* out_hash_data);
// Returns true if the payload in |payload_path| is signed and its hash can be
// verified using the public key in |public_key_path| with the signature
@@ -59,14 +59,14 @@
// hash should be a pointer to vector of exactly 256 bits. The vector
// will be modified in place and will result in having a length of
// 2048 bits. Returns true on success, false otherwise.
- static bool PadRSA2048SHA256Hash(chromeos::Blob* hash);
+ static bool PadRSA2048SHA256Hash(brillo::Blob* hash);
// Reads the payload from the given |payload_path| into the |out_payload|
// vector. It also parses the manifest protobuf in the payload and returns it
// in |out_manifest| along with the size of the entire metadata in
// |out_metadata_size|.
static bool LoadPayload(const std::string& payload_path,
- chromeos::Blob* out_payload,
+ brillo::Blob* out_payload,
DeltaArchiveManifest* out_manifest,
uint64_t* out_metadata_size);
diff --git a/postinstall_runner_action_unittest.cc b/postinstall_runner_action_unittest.cc
index bf42749..ca6627e 100644
--- a/postinstall_runner_action_unittest.cc
+++ b/postinstall_runner_action_unittest.cc
@@ -28,9 +28,9 @@
#include <base/message_loop/message_loop.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/bind_lambda.h>
-#include <chromeos/message_loops/base_message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/bind_lambda.h>
+#include <brillo/message_loops/base_message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <gtest/gtest.h>
#include "update_engine/constants.h"
@@ -38,7 +38,7 @@
#include "update_engine/test_utils.h"
#include "update_engine/utils.h"
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using chromeos_update_engine::test_utils::System;
using chromeos_update_engine::test_utils::WriteFileString;
using std::string;
@@ -63,8 +63,8 @@
static const char* kImageMountPointTemplate;
base::MessageLoopForIO base_loop_;
- chromeos::BaseMessageLoop loop_{&base_loop_};
- chromeos::AsynchronousSignalHandler async_signal_handler_;
+ brillo::BaseMessageLoop loop_{&base_loop_};
+ brillo::AsynchronousSignalHandler async_signal_handler_;
Subprocess subprocess_;
FakeSystemState fake_system_state_;
};
diff --git a/proxy_resolver.cc b/proxy_resolver.cc
index 7448b8d..abd6f76 100644
--- a/proxy_resolver.cc
+++ b/proxy_resolver.cc
@@ -19,7 +19,7 @@
#include <base/bind.h>
#include <base/location.h>
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using std::deque;
using std::string;
diff --git a/proxy_resolver.h b/proxy_resolver.h
index 7e436cd..e0e75de 100644
--- a/proxy_resolver.h
+++ b/proxy_resolver.h
@@ -21,7 +21,7 @@
#include <string>
#include <base/logging.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include "update_engine/utils.h"
@@ -71,8 +71,8 @@
private:
// The ID of the main loop callback.
- chromeos::MessageLoop::TaskId idle_callback_id_{
- chromeos::MessageLoop::kTaskIdNull};
+ brillo::MessageLoop::TaskId idle_callback_id_{
+ brillo::MessageLoop::kTaskIdNull};
// Number of direct proxies to return on resolved list; currently used for
// testing.
diff --git a/subprocess.cc b/subprocess.cc
index e425bdf..59b8e1e 100644
--- a/subprocess.cc
+++ b/subprocess.cc
@@ -30,10 +30,10 @@
#include <base/posix/eintr_wrapper.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/process.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/process.h>
+#include <brillo/secure_blob.h>
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using std::string;
using std::unique_ptr;
using std::vector;
@@ -71,7 +71,7 @@
// Process.
bool LaunchProcess(const vector<string>& cmd,
uint32_t flags,
- chromeos::Process* proc) {
+ brillo::Process* proc) {
for (const string& arg : cmd)
proc->AddArg(arg);
proc->SetSearchPath((flags & Subprocess::kSearchPath) != 0);
@@ -93,7 +93,7 @@
} // namespace
void Subprocess::Init(
- chromeos::AsynchronousSignalHandlerInterface* async_signal_handler) {
+ brillo::AsynchronousSignalHandlerInterface* async_signal_handler) {
if (subprocess_singleton_ == this)
return;
CHECK(subprocess_singleton_ == nullptr);
@@ -226,7 +226,7 @@
uint32_t flags,
int* return_code,
string* stdout) {
- chromeos::ProcessImpl proc;
+ brillo::ProcessImpl proc;
if (!LaunchProcess(cmd, flags, &proc)) {
LOG(ERROR) << "Failed to launch subprocess";
return false;
@@ -255,7 +255,7 @@
int proc_return_code = proc.Wait();
if (return_code)
*return_code = proc_return_code;
- return proc_return_code != chromeos::Process::kErrorExitStatus;
+ return proc_return_code != brillo::Process::kErrorExitStatus;
}
bool Subprocess::SubprocessInFlight() {
diff --git a/subprocess.h b/subprocess.h
index f330b9b..8c72c31 100644
--- a/subprocess.h
+++ b/subprocess.h
@@ -27,10 +27,10 @@
#include <base/callback.h>
#include <base/logging.h>
#include <base/macros.h>
-#include <chromeos/asynchronous_signal_handler_interface.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/process.h>
-#include <chromeos/process_reaper.h>
+#include <brillo/asynchronous_signal_handler_interface.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/process.h>
+#include <brillo/process_reaper.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
// The Subprocess class is a singleton. It's used to spawn off a subprocess
@@ -61,7 +61,7 @@
~Subprocess();
// Initialize and register the Subprocess singleton.
- void Init(chromeos::AsynchronousSignalHandlerInterface* async_signal_handler);
+ void Init(brillo::AsynchronousSignalHandlerInterface* async_signal_handler);
// Launches a process in the background and calls the passed |callback| when
// the process exits.
@@ -105,12 +105,12 @@
// The ProcessImpl instance managing the child process. Destroying this
// will close our end of the pipes we have open.
- chromeos::ProcessImpl proc;
+ brillo::ProcessImpl proc;
// These are used to monitor the stdout of the running process, including
// the stderr if it was redirected.
- chromeos::MessageLoop::TaskId stdout_task_id{
- chromeos::MessageLoop::kTaskIdNull};
+ brillo::MessageLoop::TaskId stdout_task_id{
+ brillo::MessageLoop::kTaskIdNull};
int stdout_fd{-1};
std::string stdout;
};
@@ -131,7 +131,7 @@
std::map<pid_t, std::unique_ptr<SubprocessRecord>> subprocess_records_;
// Used to watch for child processes.
- chromeos::ProcessReaper process_reaper_;
+ brillo::ProcessReaper process_reaper_;
DISALLOW_COPY_AND_ASSIGN(Subprocess);
};
diff --git a/subprocess_unittest.cc b/subprocess_unittest.cc
index 030e0a5..af8eec3 100644
--- a/subprocess_unittest.cc
+++ b/subprocess_unittest.cc
@@ -35,18 +35,18 @@
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
#include <base/time/time.h>
-#include <chromeos/bind_lambda.h>
-#include <chromeos/message_loops/base_message_loop.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
-#include <chromeos/strings/string_utils.h>
+#include <brillo/bind_lambda.h>
+#include <brillo/message_loops/base_message_loop.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
+#include <brillo/strings/string_utils.h>
#include <gtest/gtest.h>
#include "update_engine/test_utils.h"
#include "update_engine/utils.h"
using base::TimeDelta;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using std::string;
using std::vector;
@@ -61,8 +61,8 @@
}
base::MessageLoopForIO base_loop_;
- chromeos::BaseMessageLoop loop_{&base_loop_};
- chromeos::AsynchronousSignalHandler async_signal_handler_;
+ brillo::BaseMessageLoop loop_{&base_loop_};
+ brillo::AsynchronousSignalHandler async_signal_handler_;
Subprocess subprocess_;
};
@@ -80,8 +80,8 @@
void ExpectedEnvVars(int return_code, const string& output) {
EXPECT_EQ(0, return_code);
const std::set<string> allowed_envs = {"LD_LIBRARY_PATH", "PATH"};
- for (string key_value : chromeos::string_utils::Split(output, "\n")) {
- auto key_value_pair = chromeos::string_utils::SplitAtFirst(
+ for (string key_value : brillo::string_utils::Split(output, "\n")) {
+ auto key_value_pair = brillo::string_utils::SplitAtFirst(
key_value, "=", true);
EXPECT_NE(allowed_envs.end(), allowed_envs.find(key_value_pair.first));
}
@@ -252,7 +252,7 @@
loop_.Run();
// This test would leak a callback that runs when the child process exits
// unless we wait for it to run.
- chromeos::MessageLoopRunUntil(
+ brillo::MessageLoopRunUntil(
&loop_,
TimeDelta::FromSeconds(10),
base::Bind([] {
diff --git a/test_utils.cc b/test_utils.cc
index 896097f..abf91d3 100644
--- a/test_utils.cc
+++ b/test_utils.cc
@@ -124,7 +124,7 @@
return xattr_res == 0;
}
-bool WriteFileVector(const string& path, const chromeos::Blob& data) {
+bool WriteFileVector(const string& path, const brillo::Blob& data) {
return utils::WriteFile(path.c_str(), data.data(), data.size());
}
@@ -155,8 +155,8 @@
return true;
}
-bool ExpectVectorsEq(const chromeos::Blob& expected,
- const chromeos::Blob& actual) {
+bool ExpectVectorsEq(const brillo::Blob& expected,
+ const brillo::Blob& actual) {
EXPECT_EQ(expected.size(), actual.size());
if (expected.size() != actual.size())
return false;
@@ -168,7 +168,7 @@
return is_all_eq;
}
-void FillWithData(chromeos::Blob* buffer) {
+void FillWithData(brillo::Blob* buffer) {
size_t input_counter = 0;
for (uint8_t& b : *buffer) {
b = kRandomString[input_counter];
diff --git a/test_utils.h b/test_utils.h
index 6108b6f..9e2d4f7 100644
--- a/test_utils.h
+++ b/test_utils.h
@@ -53,14 +53,14 @@
// Writes the data passed to path. The file at path will be overwritten if it
// exists. Returns true on success, false otherwise.
-bool WriteFileVector(const std::string& path, const chromeos::Blob& data);
+bool WriteFileVector(const std::string& path, const brillo::Blob& data);
bool WriteFileString(const std::string& path, const std::string& data);
bool BindToUnusedLoopDevice(const std::string &filename,
std::string* lo_dev_name_ptr);
// Returns true iff a == b
-bool ExpectVectorsEq(const chromeos::Blob& a, const chromeos::Blob& b);
+bool ExpectVectorsEq(const brillo::Blob& a, const brillo::Blob& b);
inline int System(const std::string& cmd) {
return system(cmd.c_str());
@@ -87,7 +87,7 @@
// supported, false if not or if an error occurred.
bool IsXAttrSupported(const base::FilePath& dir_path);
-void FillWithData(chromeos::Blob* buffer);
+void FillWithData(brillo::Blob* buffer);
// Creates an empty ext image.
void CreateEmptyExtImageAtPath(const std::string& path,
diff --git a/testrunner.cc b/testrunner.cc
index 35295a9..354394b 100644
--- a/testrunner.cc
+++ b/testrunner.cc
@@ -20,7 +20,7 @@
#include <base/at_exit.h>
#include <base/command_line.h>
-#include <chromeos/test_helpers.h>
+#include <brillo/test_helpers.h>
#include <gtest/gtest.h>
#include "update_engine/terminator.h"
diff --git a/update_attempter.cc b/update_attempter.cc
index 7824cd8..6ae0f94 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -31,8 +31,8 @@
#include <base/rand_util.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/bind_lambda.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/bind_lambda.h>
+#include <brillo/message_loops/message_loop.h>
#include <debugd/dbus-constants.h>
#include <metrics/metrics_library.h>
#include <policy/device_policy.h>
@@ -73,7 +73,7 @@
using base::Time;
using base::TimeDelta;
using base::TimeTicks;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using chromeos_update_manager::EvalStatus;
using chromeos_update_manager::Policy;
using chromeos_update_manager::UpdateCheckParams;
@@ -823,7 +823,7 @@
}
LOG(INFO) << "Calling " << power_manager::kPowerManagerInterface << "."
<< power_manager::kRequestRestartMethod;
- chromeos::ErrorPtr error;
+ brillo::ErrorPtr error;
return power_manager_proxy->RequestRestart(
power_manager::REQUEST_RESTART_FOR_UPDATE, &error);
}
@@ -1563,7 +1563,7 @@
if (!debugd_proxy_)
return false;
int32_t dev_features = debugd::DEV_FEATURES_DISABLED;
- chromeos::ErrorPtr error;
+ brillo::ErrorPtr error;
bool success = debugd_proxy_->QueryDevFeatures(&dev_features, &error);
// Some boards may not include debugd so it's expected that this may fail,
diff --git a/update_attempter.h b/update_attempter.h
index a106a2e..7a5e4b7 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -420,8 +420,8 @@
utils::CpuShares shares_ = utils::kCpuSharesNormal;
// The cpu shares management timeout task id.
- chromeos::MessageLoop::TaskId manage_shares_id_{
- chromeos::MessageLoop::kTaskIdNull};
+ brillo::MessageLoop::TaskId manage_shares_id_{
+ brillo::MessageLoop::kTaskIdNull};
// Set to true if an update download is active (and BytesReceived
// will be called), set to false otherwise.
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index 1f506df..c08f1f8 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -22,11 +22,11 @@
#include <base/files/file_util.h>
#include <base/message_loop/message_loop.h>
-#include <chromeos/bind_lambda.h>
-#include <chromeos/make_unique_ptr.h>
-#include <chromeos/message_loops/base_message_loop.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/bind_lambda.h>
+#include <brillo/make_unique_ptr.h>
+#include <brillo/message_loops/base_message_loop.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <debugd/dbus-constants.h>
#include <debugd/dbus-proxies.h>
#include <debugd/dbus-proxy-mocks.h>
@@ -56,7 +56,7 @@
using base::Time;
using base::TimeDelta;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using org::chromium::LibCrosServiceInterfaceProxyMock;
using org::chromium::UpdateEngineLibcrosProxyResolvedInterfaceProxyMock;
using std::string;
@@ -118,8 +118,8 @@
ue_proxy_resolved_interface_mock_(
new NiceMock<UpdateEngineLibcrosProxyResolvedInterfaceProxyMock>()),
libcros_proxy_(
- chromeos::make_unique_ptr(service_interface_mock_),
- chromeos::make_unique_ptr(ue_proxy_resolved_interface_mock_)) {
+ brillo::make_unique_ptr(service_interface_mock_),
+ brillo::make_unique_ptr(ue_proxy_resolved_interface_mock_)) {
// Override system state members.
fake_system_state_.set_connection_manager(&mock_connection_manager);
fake_system_state_.set_update_attempter(&attempter_);
@@ -194,7 +194,7 @@
}
base::MessageLoopForIO base_loop_;
- chromeos::BaseMessageLoop loop_{&base_loop_};
+ brillo::BaseMessageLoop loop_{&base_loop_};
FakeSystemState fake_system_state_;
org::chromium::debugdProxyMock debugd_proxy_mock_;
@@ -561,7 +561,7 @@
loop_.PostTask(FROM_HERE,
base::Bind(&UpdateAttempterTest::PingOmahaTestStart,
base::Unretained(this)));
- chromeos::MessageLoopRunMaxIterations(&loop_, 100);
+ brillo::MessageLoopRunMaxIterations(&loop_, 100);
EXPECT_EQ(UpdateStatus::UPDATED_NEED_REBOOT, attempter_.status());
EXPECT_TRUE(attempter_.schedule_updates_called());
}
diff --git a/update_engine_client.cc b/update_engine_client.cc
index 93c99e4..b59f22f 100644
--- a/update_engine_client.cc
+++ b/update_engine_client.cc
@@ -24,8 +24,8 @@
#include <base/command_line.h>
#include <base/logging.h>
#include <base/macros.h>
-#include <chromeos/daemons/dbus_daemon.h>
-#include <chromeos/flag_helper.h>
+#include <brillo/daemons/dbus_daemon.h>
+#include <brillo/flag_helper.h>
#include <dbus/bus.h>
#include <update_engine/dbus-constants.h>
#include <update_engine/dbus-proxies.h>
@@ -40,7 +40,7 @@
// initialization.
const int kContinueRunning = -1;
-class UpdateEngineClient : public chromeos::DBusDaemon {
+class UpdateEngineClient : public brillo::DBusDaemon {
public:
UpdateEngineClient(int argc, char** argv) : argc_(argc), argv_(argv) {}
~UpdateEngineClient() override = default;
@@ -468,7 +468,7 @@
// Boilerplate init commands.
base::CommandLine::Init(argc_, argv_);
- chromeos::FlagHelper::Init(argc_, argv_, "Chromium OS Update Engine Client");
+ brillo::FlagHelper::Init(argc_, argv_, "Chromium OS Update Engine Client");
// Ensure there are no positional arguments.
const std::vector<string> positional_args =
diff --git a/update_manager/chromeos_policy_unittest.cc b/update_manager/chromeos_policy_unittest.cc
index e456e19..f74eb8b 100644
--- a/update_manager/chromeos_policy_unittest.cc
+++ b/update_manager/chromeos_policy_unittest.cc
@@ -22,7 +22,7 @@
#include <vector>
#include <base/time/time.h>
-#include <chromeos/message_loops/fake_message_loop.h>
+#include <brillo/message_loops/fake_message_loop.h>
#include <gtest/gtest.h>
#include "update_engine/fake_clock.h"
@@ -195,7 +195,7 @@
<< "\nEvaluation context: " << eval_ctx_->DumpContext();
}
- chromeos::FakeMessageLoop loop_{nullptr};
+ brillo::FakeMessageLoop loop_{nullptr};
FakeClock fake_clock_;
FakeState fake_state_;
scoped_refptr<EvaluationContext> eval_ctx_;
diff --git a/update_manager/evaluation_context.cc b/update_manager/evaluation_context.cc
index 65d9460..0453eac 100644
--- a/update_manager/evaluation_context.cc
+++ b/update_manager/evaluation_context.cc
@@ -32,7 +32,7 @@
using base::Closure;
using base::Time;
using base::TimeDelta;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using chromeos_update_engine::ClockInterface;
using std::string;
using std::unique_ptr;
diff --git a/update_manager/evaluation_context.h b/update_manager/evaluation_context.h
index e109348..a57daa6 100644
--- a/update_manager/evaluation_context.h
+++ b/update_manager/evaluation_context.h
@@ -26,7 +26,7 @@
#include <base/memory/ref_counted.h>
#include <base/memory/weak_ptr.h>
#include <base/time/time.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include "update_engine/clock_interface.h"
#include "update_engine/update_manager/boxed_value.h"
@@ -163,8 +163,8 @@
// The TaskId returned by the message loop identifying the timeout callback.
// Used for canceling the timeout callback.
- chromeos::MessageLoop::TaskId timeout_event_ =
- chromeos::MessageLoop::kTaskIdNull;
+ brillo::MessageLoop::TaskId timeout_event_ =
+ brillo::MessageLoop::kTaskIdNull;
// Whether a timeout event firing marks the expiration of the evaluation
// context.
diff --git a/update_manager/evaluation_context_unittest.cc b/update_manager/evaluation_context_unittest.cc
index 5c5a71b..3f2ff5e 100644
--- a/update_manager/evaluation_context_unittest.cc
+++ b/update_manager/evaluation_context_unittest.cc
@@ -20,8 +20,8 @@
#include <string>
#include <base/bind.h>
-#include <chromeos/message_loops/fake_message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/message_loops/fake_message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <gtest/gtest.h>
#include "update_engine/fake_clock.h"
@@ -34,9 +34,9 @@
using base::Closure;
using base::Time;
using base::TimeDelta;
-using chromeos::MessageLoop;
-using chromeos::MessageLoopRunMaxIterations;
-using chromeos::MessageLoopRunUntil;
+using brillo::MessageLoop;
+using brillo::MessageLoopRunMaxIterations;
+using brillo::MessageLoopRunUntil;
using chromeos_update_engine::FakeClock;
using std::string;
using std::unique_ptr;
@@ -121,7 +121,7 @@
TimeDelta default_timeout_ = TimeDelta::FromSeconds(5);
- chromeos::FakeMessageLoop loop_{nullptr};
+ brillo::FakeMessageLoop loop_{nullptr};
FakeClock fake_clock_;
scoped_refptr<EvaluationContext> eval_ctx_;
diff --git a/update_manager/generic_variables_unittest.cc b/update_manager/generic_variables_unittest.cc
index 5ea48f9..cb0c48f 100644
--- a/update_manager/generic_variables_unittest.cc
+++ b/update_manager/generic_variables_unittest.cc
@@ -19,15 +19,15 @@
#include <memory>
#include <base/callback.h>
-#include <chromeos/message_loops/fake_message_loop.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/message_loops/fake_message_loop.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <gtest/gtest.h>
#include "update_engine/update_manager/umtest_utils.h"
-using chromeos::MessageLoop;
-using chromeos::MessageLoopRunMaxIterations;
+using brillo::MessageLoop;
+using brillo::MessageLoopRunMaxIterations;
using std::unique_ptr;
namespace chromeos_update_manager {
@@ -158,7 +158,7 @@
}
- chromeos::FakeMessageLoop loop_{nullptr};
+ brillo::FakeMessageLoop loop_{nullptr};
};
TEST_F(UmAsyncCopyVariableTest, ConstructorTest) {
diff --git a/update_manager/real_config_provider.cc b/update_manager/real_config_provider.cc
index 1713320..ebaac75 100644
--- a/update_manager/real_config_provider.cc
+++ b/update_manager/real_config_provider.cc
@@ -18,13 +18,13 @@
#include <base/files/file_path.h>
#include <base/logging.h>
-#include <chromeos/key_value_store.h>
+#include <brillo/key_value_store.h>
#include "update_engine/constants.h"
#include "update_engine/update_manager/generic_variables.h"
#include "update_engine/utils.h"
-using chromeos::KeyValueStore;
+using brillo::KeyValueStore;
namespace {
diff --git a/update_manager/real_device_policy_provider.cc b/update_manager/real_device_policy_provider.cc
index f158e27..e7ddb13 100644
--- a/update_manager/real_device_policy_provider.cc
+++ b/update_manager/real_device_policy_provider.cc
@@ -28,7 +28,7 @@
#include "update_engine/utils.h"
using base::TimeDelta;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using policy::DevicePolicy;
using std::set;
using std::string;
diff --git a/update_manager/real_device_policy_provider.h b/update_manager/real_device_policy_provider.h
index 2bb9cad..6094e93 100644
--- a/update_manager/real_device_policy_provider.h
+++ b/update_manager/real_device_policy_provider.h
@@ -20,7 +20,7 @@
#include <set>
#include <string>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
#include <policy/libpolicy.h>
#include <session_manager/dbus-proxies.h>
@@ -132,8 +132,8 @@
policy::PolicyProvider* policy_provider_;
// Used to schedule refreshes of the device policy.
- chromeos::MessageLoop::TaskId scheduled_refresh_{
- chromeos::MessageLoop::kTaskIdNull};
+ brillo::MessageLoop::TaskId scheduled_refresh_{
+ brillo::MessageLoop::kTaskIdNull};
// The DBus (mockable) session manager proxy, owned by the caller.
org::chromium::SessionManagerInterfaceProxyInterface* session_manager_proxy_{
diff --git a/update_manager/real_device_policy_provider_unittest.cc b/update_manager/real_device_policy_provider_unittest.cc
index 93bf1bb..cd2829d 100644
--- a/update_manager/real_device_policy_provider_unittest.cc
+++ b/update_manager/real_device_policy_provider_unittest.cc
@@ -18,9 +18,9 @@
#include <memory>
-#include <chromeos/message_loops/fake_message_loop.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/message_loops/fake_message_loop.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <policy/mock_device_policy.h>
@@ -33,7 +33,7 @@
#include "update_engine/update_manager/umtest_utils.h"
using base::TimeDelta;
-using chromeos::MessageLoop;
+using brillo::MessageLoop;
using chromeos_update_engine::dbus_test_utils::MockSignalHandler;
using std::set;
using std::string;
@@ -88,7 +88,7 @@
.WillByDefault(ReturnRef(mock_device_policy_));
}
- chromeos::FakeMessageLoop loop_{nullptr};
+ brillo::FakeMessageLoop loop_{nullptr};
org::chromium::SessionManagerInterfaceProxyMock session_manager_proxy_mock_;
testing::NiceMock<policy::MockDevicePolicy> mock_device_policy_;
testing::NiceMock<policy::MockPolicyProvider> mock_policy_provider_;
diff --git a/update_manager/real_shill_provider.cc b/update_manager/real_shill_provider.cc
index a38c006..da0b545 100644
--- a/update_manager/real_shill_provider.cc
+++ b/update_manager/real_shill_provider.cc
@@ -20,7 +20,7 @@
#include <base/logging.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/type_name_undecorate.h>
+#include <brillo/type_name_undecorate.h>
#include <shill/dbus-constants.h>
#include <shill/dbus-proxies.h>
@@ -72,8 +72,8 @@
// Attempt to read initial connection status. Even if this fails because shill
// is not responding (e.g. it is down) we'll be notified via "PropertyChanged"
// signal as soon as it comes up, so this is not a critical step.
- chromeos::VariantDictionary properties;
- chromeos::ErrorPtr error;
+ brillo::VariantDictionary properties;
+ brillo::ErrorPtr error;
if (!manager_proxy->GetProperties(&properties, &error))
return true;
@@ -88,13 +88,13 @@
}
void RealShillProvider::OnManagerPropertyChanged(const string& name,
- const chromeos::Any& value) {
+ const brillo::Any& value) {
if (name == shill::kDefaultServiceProperty) {
dbus::ObjectPath service_path = value.TryGet<dbus::ObjectPath>();
if (!service_path.IsValid()) {
LOG(WARNING) << "Got an invalid DefaultService path. The property value "
"contains a "
- << chromeos::UndecorateTypeName(value.GetType().name())
+ << brillo::UndecorateTypeName(value.GetType().name())
<< ", read as the object path: '" << service_path.value()
<< "'";
}
@@ -136,8 +136,8 @@
shill_proxy_->GetServiceForPath(default_service_path_);
// Get the connection properties synchronously.
- chromeos::VariantDictionary properties;
- chromeos::ErrorPtr error;
+ brillo::VariantDictionary properties;
+ brillo::ErrorPtr error;
if (!service->GetProperties(&properties, &error)) {
var_conn_type_.UnsetValue();
var_conn_tethering_.UnsetValue();
diff --git a/update_manager/real_shill_provider.h b/update_manager/real_shill_provider.h
index aca4bae..5f3f6bf 100644
--- a/update_manager/real_shill_provider.h
+++ b/update_manager/real_shill_provider.h
@@ -69,7 +69,7 @@
private:
// A handler for ManagerProxy.PropertyChanged signal.
void OnManagerPropertyChanged(const std::string& name,
- const chromeos::Any& value);
+ const brillo::Any& value);
// Called when the signal in ManagerProxy.PropertyChanged is connected.
void OnSignalConnected(const std::string& interface_name,
diff --git a/update_manager/real_shill_provider_unittest.cc b/update_manager/real_shill_provider_unittest.cc
index cab4f60..7272019 100644
--- a/update_manager/real_shill_provider_unittest.cc
+++ b/update_manager/real_shill_provider_unittest.cc
@@ -19,8 +19,8 @@
#include <utility>
#include <base/time/time.h>
-#include <chromeos/make_unique_ptr.h>
-#include <chromeos/message_loops/fake_message_loop.h>
+#include <brillo/make_unique_ptr.h>
+#include <brillo/message_loops/fake_message_loop.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <shill/dbus-constants.h>
@@ -200,13 +200,13 @@
provider_->var_conn_last_changed());
}
- chromeos::FakeMessageLoop loop_{nullptr};
+ brillo::FakeMessageLoop loop_{nullptr};
FakeClock fake_clock_;
chromeos_update_engine::FakeShillProxy fake_shill_proxy_;
// The registered signal handler for the signal Manager.PropertyChanged.
chromeos_update_engine::dbus_test_utils::MockSignalHandler<
- void(const std::string&, const chromeos::Any&)> manager_property_changed_;
+ void(const std::string&, const brillo::Any&)> manager_property_changed_;
unique_ptr<RealShillProvider> provider_;
};
@@ -222,7 +222,7 @@
// Create a dictionary of properties and optionally include the default
// service.
- chromeos::VariantDictionary reply_dict;
+ brillo::VariantDictionary reply_dict;
reply_dict["SomeOtherProperty"] = 0xC0FFEE;
if (default_service) {
@@ -238,7 +238,7 @@
const char* service_type,
const char* physical_technology,
const char* service_tethering) {
- chromeos::VariantDictionary reply_dict;
+ brillo::VariantDictionary reply_dict;
reply_dict["SomeOtherProperty"] = 0xC0FFEE;
if (service_type)
@@ -260,7 +260,7 @@
fake_shill_proxy_.SetServiceForPath(
dbus::ObjectPath(service_path),
- chromeos::make_unique_ptr(service_proxy_mock));
+ brillo::make_unique_ptr(service_proxy_mock));
return service_proxy_mock;
}
@@ -288,7 +288,7 @@
// Ensure that a service path property including a different type is ignored.
TEST_F(UmRealShillProviderTest, InvalidServicePathType) {
ManagerProxyMock* manager_proxy_mock = fake_shill_proxy_.GetManagerProxy();
- chromeos::VariantDictionary reply_dict;
+ brillo::VariantDictionary reply_dict;
reply_dict[shill::kDefaultServiceProperty] = "/not/an/object/path";
EXPECT_CALL(*manager_proxy_mock, GetProperties(_, _, _))
.WillOnce(DoAll(SetArgPointee<0>(reply_dict), Return(true)));
diff --git a/update_manager/update_manager-inl.h b/update_manager/update_manager-inl.h
index 2f6b603..77224cf 100644
--- a/update_manager/update_manager-inl.h
+++ b/update_manager/update_manager-inl.h
@@ -22,7 +22,7 @@
#include <base/bind.h>
#include <base/location.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include "update_engine/update_manager/evaluation_context.h"
@@ -157,7 +157,7 @@
base::Closure eval_callback = base::Bind(
&UpdateManager::OnPolicyReadyToEvaluate<R, ExpectedArgs...>,
base::Unretained(this), ec, callback, policy_method, args...);
- chromeos::MessageLoop::current()->PostTask(FROM_HERE, eval_callback);
+ brillo::MessageLoop::current()->PostTask(FROM_HERE, eval_callback);
}
} // namespace chromeos_update_manager
diff --git a/update_manager/update_manager_unittest.cc b/update_manager/update_manager_unittest.cc
index d49824e..03f37c7 100644
--- a/update_manager/update_manager_unittest.cc
+++ b/update_manager/update_manager_unittest.cc
@@ -28,9 +28,9 @@
#include <base/bind.h>
#include <base/test/simple_test_clock.h>
#include <base/time/time.h>
-#include <chromeos/message_loops/fake_message_loop.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/message_loops/fake_message_loop.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -44,8 +44,8 @@
using base::Callback;
using base::Time;
using base::TimeDelta;
-using chromeos::MessageLoop;
-using chromeos::MessageLoopRunMaxIterations;
+using brillo::MessageLoop;
+using brillo::MessageLoopRunMaxIterations;
using chromeos_update_engine::ErrorCode;
using chromeos_update_engine::FakeClock;
using std::pair;
@@ -88,7 +88,7 @@
}
base::SimpleTestClock test_clock_;
- chromeos::FakeMessageLoop loop_{&test_clock_};
+ brillo::FakeMessageLoop loop_{&test_clock_};
FakeState* fake_state_; // Owned by the umut_.
FakeClock fake_clock_;
unique_ptr<UpdateManager> umut_;
diff --git a/update_manager/variable.h b/update_manager/variable.h
index a568a37..98774ef 100644
--- a/update_manager/variable.h
+++ b/update_manager/variable.h
@@ -25,7 +25,7 @@
#include <base/location.h>
#include <base/logging.h>
#include <base/time/time.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
namespace chromeos_update_manager {
@@ -120,7 +120,7 @@
// to avoid scheduling these callbacks when it is not needed, we check
// first the list of observers.
if (!observer_list_.empty()) {
- chromeos::MessageLoop::current()->PostTask(
+ brillo::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&BaseVariable::OnValueChangedNotification,
base::Unretained(this)));
diff --git a/update_manager/variable_unittest.cc b/update_manager/variable_unittest.cc
index 0622db0..13cceb1 100644
--- a/update_manager/variable_unittest.cc
+++ b/update_manager/variable_unittest.cc
@@ -18,14 +18,14 @@
#include <vector>
-#include <chromeos/message_loops/fake_message_loop.h>
-#include <chromeos/message_loops/message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/message_loops/fake_message_loop.h>
+#include <brillo/message_loops/message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <gtest/gtest.h>
using base::TimeDelta;
-using chromeos::MessageLoop;
-using chromeos::MessageLoopRunMaxIterations;
+using brillo::MessageLoop;
+using brillo::MessageLoopRunMaxIterations;
using std::string;
using std::vector;
@@ -57,7 +57,7 @@
loop_.SetAsCurrent();
}
- chromeos::FakeMessageLoop loop_{nullptr};
+ brillo::FakeMessageLoop loop_{nullptr};
};
TEST_F(UmBaseVariableTest, GetNameTest) {
diff --git a/utils.cc b/utils.cc
index 98f3576..ba2c837 100644
--- a/utils.cc
+++ b/utils.cc
@@ -51,8 +51,8 @@
#include <base/strings/string_split.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/data_encoding.h>
-#include <chromeos/message_loops/message_loop.h>
+#include <brillo/data_encoding.h>
+#include <brillo/message_loops/message_loop.h>
#include "update_engine/clock_interface.h"
#include "update_engine/constants.h"
@@ -275,7 +275,7 @@
// Append |nbytes| of content from |buf| to the vector pointed to by either
// |vec_p| or |str_p|.
static void AppendBytes(const uint8_t* buf, size_t nbytes,
- chromeos::Blob* vec_p) {
+ brillo::Blob* vec_p) {
CHECK(buf);
CHECK(vec_p);
vec_p->insert(vec_p->end(), buf, buf + nbytes);
@@ -351,7 +351,7 @@
return (success && pclose(fp) >= 0);
}
-bool ReadFile(const string& path, chromeos::Blob* out_p) {
+bool ReadFile(const string& path, brillo::Blob* out_p) {
return ReadFileChunkAndAppend(path, 0, -1, out_p);
}
@@ -360,7 +360,7 @@
}
bool ReadFileChunk(const string& path, off_t offset, off_t size,
- chromeos::Blob* out_p) {
+ brillo::Blob* out_p) {
return ReadFileChunkAndAppend(path, offset, size, out_p);
}
@@ -771,7 +771,7 @@
}
bool IsExtFilesystem(const string& device) {
- chromeos::Blob header;
+ brillo::Blob header;
// The first 2 KiB is enough to read the ext2 superblock (located at offset
// 1024).
if (!ReadFileChunk(device, 0, 2048, &header))
@@ -780,7 +780,7 @@
}
bool IsSquashfsFilesystem(const string& device) {
- chromeos::Blob header;
+ brillo::Blob header;
// The first 96 is enough to read the squashfs superblock.
const ssize_t kSquashfsSuperBlockSize = 96;
if (!ReadFileChunk(device, 0, kSquashfsSuperBlockSize, &header))
@@ -860,7 +860,7 @@
}
string GetFileFormat(const string& path) {
- chromeos::Blob buffer;
+ brillo::Blob buffer;
if (!ReadFileChunkAndAppend(path, 0, kGetFileFormatMaxHeaderSize, &buffer))
return "File not found.";
@@ -888,7 +888,7 @@
} // namespace
void ScheduleCrashReporterUpload() {
- chromeos::MessageLoop::current()->PostTask(
+ brillo::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&TriggerCrashReporterUpload));
}
@@ -1420,7 +1420,7 @@
}
string CalculateP2PFileId(const string& payload_hash, size_t payload_size) {
- string encoded_hash = chromeos::data_encoding::Base64Encode(payload_hash);
+ string encoded_hash = brillo::data_encoding::Base64Encode(payload_hash);
return base::StringPrintf("cros_update_size_%" PRIuS "_hash_%s",
payload_size,
encoded_hash.c_str());
@@ -1428,7 +1428,7 @@
bool DecodeAndStoreBase64String(const string& base64_encoded,
base::FilePath *out_path) {
- chromeos::Blob contents;
+ brillo::Blob contents;
out_path->clear();
@@ -1437,7 +1437,7 @@
return false;
}
- if (!chromeos::data_encoding::Base64Decode(base64_encoded, &contents) ||
+ if (!brillo::data_encoding::Base64Decode(base64_encoded, &contents) ||
contents.size() == 0) {
LOG(ERROR) << "Error decoding base64.";
return false;
@@ -1531,7 +1531,7 @@
return ret;
}
-bool GetMinorVersion(const chromeos::KeyValueStore& store,
+bool GetMinorVersion(const brillo::KeyValueStore& store,
uint32_t* minor_version) {
string result;
if (store.GetString("PAYLOAD_MINOR_VERSION", &result)) {
@@ -1545,9 +1545,9 @@
}
bool ReadExtents(const string& path, const vector<Extent>& extents,
- chromeos::Blob* out_data, ssize_t out_data_size,
+ brillo::Blob* out_data, ssize_t out_data_size,
size_t block_size) {
- chromeos::Blob data(out_data_size);
+ brillo::Blob data(out_data_size);
ssize_t bytes_read = 0;
int fd = open(path.c_str(), O_RDONLY);
TEST_AND_RETURN_FALSE_ERRNO(fd >= 0);
diff --git a/utils.h b/utils.h
index 94dff9d..22aeba2 100644
--- a/utils.h
+++ b/utils.h
@@ -30,8 +30,8 @@
#include <base/files/file_path.h>
#include <base/posix/eintr_wrapper.h>
#include <base/time/time.h>
-#include <chromeos/key_value_store.h>
-#include <chromeos/secure_blob.h>
+#include <brillo/key_value_store.h>
+#include <brillo/secure_blob.h>
#include "metrics/metrics_library.h"
#include "update_engine/action.h"
@@ -93,10 +93,10 @@
// file's content, false otherwise, in which case the state of the output
// container is unknown. ReadFileChunk starts reading the file from |offset|; if
// |size| is not -1, only up to |size| bytes are read in.
-bool ReadFile(const std::string& path, chromeos::Blob* out_p);
+bool ReadFile(const std::string& path, brillo::Blob* out_p);
bool ReadFile(const std::string& path, std::string* out_p);
bool ReadFileChunk(const std::string& path, off_t offset, off_t size,
- chromeos::Blob* out_p);
+ brillo::Blob* out_p);
// Invokes |cmd| in a pipe and appends its stdout to the container pointed to by
// |out_p|. Returns true upon successfully reading all of the output, false
@@ -251,7 +251,7 @@
inline void HexDumpString(const std::string& str) {
HexDumpArray(reinterpret_cast<const uint8_t*>(str.data()), str.size());
}
-inline void HexDumpVector(const chromeos::Blob& vect) {
+inline void HexDumpVector(const brillo::Blob& vect) {
HexDumpArray(vect.data(), vect.size());
}
@@ -398,7 +398,7 @@
// Look for the minor version value in the passed |store| and set
// |minor_version| to that value. Return whether the value was found and valid.
-bool GetMinorVersion(const chromeos::KeyValueStore& store,
+bool GetMinorVersion(const brillo::KeyValueStore& store,
uint32_t* minor_version);
// This function reads the specified data in |extents| into |out_data|. The
@@ -406,7 +406,7 @@
// |out_data|. Returns false if the number of bytes to read given in
// |extents| does not equal |out_data_size|.
bool ReadExtents(const std::string& path, const std::vector<Extent>& extents,
- chromeos::Blob* out_data, ssize_t out_data_size,
+ brillo::Blob* out_data, ssize_t out_data_size,
size_t block_size);
// Read the current boot identifier and store it in |boot_id|. This identifier
diff --git a/utils_unittest.cc b/utils_unittest.cc
index 6842b21..a315e53 100644
--- a/utils_unittest.cc
+++ b/utils_unittest.cc
@@ -30,8 +30,8 @@
#include <base/files/scoped_temp_dir.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
-#include <chromeos/message_loops/fake_message_loop.h>
-#include <chromeos/message_loops/message_loop_utils.h>
+#include <brillo/message_loops/fake_message_loop.h>
+#include <brillo/message_loops/message_loop_utils.h>
#include <gtest/gtest.h>
#include "update_engine/fake_clock.h"
@@ -40,7 +40,7 @@
#include "update_engine/prefs.h"
#include "update_engine/test_utils.h"
-using chromeos::FakeMessageLoop;
+using brillo::FakeMessageLoop;
using std::map;
using std::string;
using std::vector;
@@ -63,7 +63,7 @@
}
TEST(UtilsTest, ReadFileFailure) {
- chromeos::Blob empty;
+ brillo::Blob empty;
EXPECT_FALSE(utils::ReadFile("/this/doesn't/exist", &empty));
}
@@ -71,20 +71,20 @@
base::FilePath file;
EXPECT_TRUE(base::CreateTemporaryFile(&file));
ScopedPathUnlinker unlinker(file.value());
- chromeos::Blob data;
+ brillo::Blob data;
const size_t kSize = 1024 * 1024;
for (size_t i = 0; i < kSize; i++) {
data.push_back(i % 255);
}
EXPECT_TRUE(utils::WriteFile(file.value().c_str(), data.data(), data.size()));
- chromeos::Blob in_data;
+ brillo::Blob in_data;
EXPECT_TRUE(utils::ReadFileChunk(file.value().c_str(), kSize, 10, &in_data));
EXPECT_TRUE(in_data.empty());
EXPECT_TRUE(utils::ReadFileChunk(file.value().c_str(), 0, -1, &in_data));
EXPECT_TRUE(data == in_data);
in_data.clear();
EXPECT_TRUE(utils::ReadFileChunk(file.value().c_str(), 10, 20, &in_data));
- EXPECT_TRUE(chromeos::Blob(data.begin() + 10, data.begin() + 10 + 20) ==
+ EXPECT_TRUE(brillo::Blob(data.begin() + 10, data.begin() + 10 + 20) ==
in_data);
}
@@ -359,7 +359,7 @@
loop.SetAsCurrent();
utils::ScheduleCrashReporterUpload();
// Test that we scheduled one callback from the crash reporter.
- EXPECT_EQ(1, chromeos::MessageLoopRunMaxIterations(&loop, 100));
+ EXPECT_EQ(1, brillo::MessageLoopRunMaxIterations(&loop, 100));
EXPECT_FALSE(loop.PendingTasks());
}
@@ -690,7 +690,7 @@
// the correct value.
uint32_t minor_version;
- chromeos::KeyValueStore store;
+ brillo::KeyValueStore store;
EXPECT_FALSE(utils::GetMinorVersion(store, &minor_version));
EXPECT_TRUE(store.LoadFromString("PAYLOAD_MINOR_VERSION=one-two-three\n"));
diff --git a/xz_extent_writer.cc b/xz_extent_writer.cc
index 99eb023..813b349 100644
--- a/xz_extent_writer.cc
+++ b/xz_extent_writer.cc
@@ -21,7 +21,7 @@
namespace chromeos_update_engine {
namespace {
-const chromeos::Blob::size_type kOutputBufferLength = 16 * 1024;
+const brillo::Blob::size_type kOutputBufferLength = 16 * 1024;
// xz uses a variable dictionary size which impacts on the compression ratio
// and is required to be reconstructed in RAM during decompression. While we
@@ -78,7 +78,7 @@
request.in_pos = 0;
request.in_size = count;
- chromeos::Blob output_buffer(kOutputBufferLength);
+ brillo::Blob output_buffer(kOutputBufferLength);
request.out = output_buffer.data();
request.out_size = output_buffer.size();
for (;;) {
@@ -104,8 +104,8 @@
// Store unconsumed data (if any) in |input_buffer_|. Since |input| can point
// to the existing |input_buffer_| we create a new one before assigning it.
- chromeos::Blob new_input_buffer(request.in + request.in_pos,
- request.in + request.in_size);
+ brillo::Blob new_input_buffer(request.in + request.in_pos,
+ request.in + request.in_size);
input_buffer_ = std::move(new_input_buffer);
return true;
}
diff --git a/xz_extent_writer.h b/xz_extent_writer.h
index 0b9ee17..122d914 100644
--- a/xz_extent_writer.h
+++ b/xz_extent_writer.h
@@ -22,7 +22,7 @@
#include <memory>
#include <vector>
-#include <chromeos/secure_blob.h>
+#include <brillo/secure_blob.h>
#include "update_engine/extent_writer.h"
@@ -50,7 +50,7 @@
std::unique_ptr<ExtentWriter> underlying_writer_;
// The opaque xz decompressor struct.
xz_dec* stream_{nullptr};
- chromeos::Blob input_buffer_;
+ brillo::Blob input_buffer_;
DISALLOW_COPY_AND_ASSIGN(XzExtentWriter);
};
diff --git a/xz_extent_writer_unittest.cc b/xz_extent_writer_unittest.cc
index 2fd580d..4f464e3 100644
--- a/xz_extent_writer_unittest.cc
+++ b/xz_extent_writer_unittest.cc
@@ -25,7 +25,7 @@
#include <string>
#include <vector>
-#include <chromeos/make_unique_ptr.h>
+#include <brillo/make_unique_ptr.h>
#include <gtest/gtest.h>
#include "update_engine/fake_extent_writer.h"
@@ -89,10 +89,10 @@
void SetUp() override {
fake_extent_writer_ = new FakeExtentWriter();
xz_writer_.reset(
- new XzExtentWriter(chromeos::make_unique_ptr(fake_extent_writer_)));
+ new XzExtentWriter(brillo::make_unique_ptr(fake_extent_writer_)));
}
- void WriteAll(const chromeos::Blob& compressed) {
+ void WriteAll(const brillo::Blob& compressed) {
EXPECT_TRUE(xz_writer_->Init(fd_, {}, 1024));
EXPECT_TRUE(xz_writer_->Write(compressed.data(), compressed.size()));
EXPECT_TRUE(xz_writer_->End());
@@ -106,7 +106,7 @@
FakeExtentWriter* fake_extent_writer_{nullptr};
std::unique_ptr<XzExtentWriter> xz_writer_;
- const chromeos::Blob sample_data_{
+ const brillo::Blob sample_data_{
std::begin(kSampleData),
std::begin(kSampleData) + strlen(kSampleData)};
FileDescriptorPtr fd_;
@@ -119,13 +119,13 @@
}
TEST_F(XzExtentWriterTest, CompressedSampleData) {
- WriteAll(chromeos::Blob(std::begin(kCompressedDataNoCheck),
+ WriteAll(brillo::Blob(std::begin(kCompressedDataNoCheck),
std::end(kCompressedDataNoCheck)));
EXPECT_EQ(sample_data_, fake_extent_writer_->WrittenData());
}
TEST_F(XzExtentWriterTest, CompressedSampleDataWithCrc) {
- WriteAll(chromeos::Blob(std::begin(kCompressedDataCRC32),
+ WriteAll(brillo::Blob(std::begin(kCompressedDataCRC32),
std::end(kCompressedDataCRC32)));
EXPECT_EQ(sample_data_, fake_extent_writer_->WrittenData());
}
@@ -133,9 +133,9 @@
TEST_F(XzExtentWriterTest, CompressedDataBiggerThanTheBuffer) {
// Test that even if the output data is bigger than the internal buffer, all
// the data is written.
- WriteAll(chromeos::Blob(std::begin(kCompressed30KiBofA),
+ WriteAll(brillo::Blob(std::begin(kCompressed30KiBofA),
std::end(kCompressed30KiBofA)));
- chromeos::Blob expected_data(30 * 1024, 'a');
+ brillo::Blob expected_data(30 * 1024, 'a');
EXPECT_EQ(expected_data, fake_extent_writer_->WrittenData());
}
@@ -149,7 +149,7 @@
}
TEST_F(XzExtentWriterTest, PartialDataIsKept) {
- chromeos::Blob compressed(std::begin(kCompressed30KiBofA),
+ brillo::Blob compressed(std::begin(kCompressed30KiBofA),
std::end(kCompressed30KiBofA));
EXPECT_TRUE(xz_writer_->Init(fd_, {}, 1024));
for (uint8_t byte : compressed) {
@@ -158,7 +158,7 @@
EXPECT_TRUE(xz_writer_->End());
// The sample_data_ is an uncompressed string.
- chromeos::Blob expected_data(30 * 1024, 'a');
+ brillo::Blob expected_data(30 * 1024, 'a');
EXPECT_EQ(expected_data, fake_extent_writer_->WrittenData());
}
diff --git a/zip_unittest.cc b/zip_unittest.cc
index bcaee82..4d6eb21 100644
--- a/zip_unittest.cc
+++ b/zip_unittest.cc
@@ -35,14 +35,14 @@
template <typename T>
class ZipTest : public ::testing::Test {
public:
- bool ZipDecompress(const chromeos::Blob& in,
- chromeos::Blob* out) const = 0;
- bool ZipCompress(const chromeos::Blob& in,
- chromeos::Blob* out) const = 0;
+ bool ZipDecompress(const brillo::Blob& in,
+ brillo::Blob* out) const = 0;
+ bool ZipCompress(const brillo::Blob& in,
+ brillo::Blob* out) const = 0;
bool ZipCompressString(const string& str,
- chromeos::Blob* out) const = 0;
+ brillo::Blob* out) const = 0;
bool ZipDecompressString(const string& str,
- chromeos::Blob* out) const = 0;
+ brillo::Blob* out) const = 0;
};
class BzipTest {};
@@ -50,20 +50,20 @@
template <>
class ZipTest<BzipTest> : public ::testing::Test {
public:
- bool ZipDecompress(const chromeos::Blob& in,
- chromeos::Blob* out) const {
+ bool ZipDecompress(const brillo::Blob& in,
+ brillo::Blob* out) const {
return BzipDecompress(in, out);
}
- bool ZipCompress(const chromeos::Blob& in,
- chromeos::Blob* out) const {
+ bool ZipCompress(const brillo::Blob& in,
+ brillo::Blob* out) const {
return BzipCompress(in, out);
}
bool ZipCompressString(const string& str,
- chromeos::Blob* out) const {
+ brillo::Blob* out) const {
return BzipCompressString(str, out);
}
bool ZipDecompressString(const string& str,
- chromeos::Blob* out) const {
+ brillo::Blob* out) const {
return BzipDecompressString(str, out);
}
};
@@ -80,11 +80,11 @@
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
- chromeos::Blob out;
+ brillo::Blob out;
EXPECT_TRUE(this->ZipCompressString(in, &out));
EXPECT_LT(out.size(), in.size());
EXPECT_GT(out.size(), 0);
- chromeos::Blob decompressed;
+ brillo::Blob decompressed;
EXPECT_TRUE(this->ZipDecompress(out, &decompressed));
EXPECT_EQ(in.size(), decompressed.size());
EXPECT_TRUE(!memcmp(in.data(), decompressed.data(), in.size()));
@@ -93,11 +93,11 @@
TYPED_TEST(ZipTest, PoorCompressionTest) {
string in(reinterpret_cast<const char*>(kRandomString),
sizeof(kRandomString));
- chromeos::Blob out;
+ brillo::Blob out;
EXPECT_TRUE(this->ZipCompressString(in, &out));
EXPECT_GT(out.size(), in.size());
string out_string(out.begin(), out.end());
- chromeos::Blob decompressed;
+ brillo::Blob decompressed;
EXPECT_TRUE(this->ZipDecompressString(out_string, &decompressed));
EXPECT_EQ(in.size(), decompressed.size());
EXPECT_TRUE(!memcmp(in.data(), decompressed.data(), in.size()));
@@ -106,13 +106,13 @@
TYPED_TEST(ZipTest, MalformedZipTest) {
string in(reinterpret_cast<const char*>(kRandomString),
sizeof(kRandomString));
- chromeos::Blob out;
+ brillo::Blob out;
EXPECT_FALSE(this->ZipDecompressString(in, &out));
}
TYPED_TEST(ZipTest, EmptyInputsTest) {
string in;
- chromeos::Blob out;
+ brillo::Blob out;
EXPECT_TRUE(this->ZipDecompressString(in, &out));
EXPECT_EQ(0, out.size());