Update libchrome to r307740 and fix build errors

Updated libchrome, libchrome_crypto, metrics, feedback to the
latest revisions from Chrome (r307740).

Fixed build breaks due to the changes in upstream code:

- scope_ptr no longer needs explicit PassAs<T>() calls.
- scope_ptr<T> no longer has implicit conversion to T*.
  Must use scope_ptr<T>::get() instead.
- base/file_util.h moved to base/files/file_util.h
- ARRAYSIZE_UNSAFE() removed in favor of arraysize()
- base::AppendToFile() and base::WriteFileDescriptor() now
  return bool instead of the number of bytes written.
- dbus::Bus::AddFilterFunction() now returns void.
- C++11 features are enabled in libchromeos, so all targets
  linking with it now have to support C++11
- OVERRIDE macro is removed in favor of native C++11
  'override' keyword.

BUG=chromium:416628, chromium:411508
TEST=Build the world on x86, x64, ARM. The following builders
     were tried:
       x86-generic-full amd64-generic-full arm-generic-full
       amd64-generic-asan daisy-full nyan-full pre-cq-group
       daisy-release-group sandybridge-release-group
       pineview-release-group
CQ-DEPEND=CL:234450,CL:234980

Change-Id: I374bebe2211d533c4431c82efb8be1cdcb1f405d
Reviewed-on: https://chromium-review.googlesource.com/234440
Reviewed-by: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
This commit is contained in:
Alex Vakulenko 2014-12-10 12:52:31 -08:00 committed by chrome-internal-fetch
parent 788d3b6365
commit 73b40b468b
6 changed files with 17 additions and 17 deletions

View File

@ -1,8 +0,0 @@
{
'variables': {
'libbase_ver': 293518,
},
'includes': [
'../metrics/libmetrics.gypi',
],
}

View File

@ -0,0 +1,8 @@
{
'variables': {
'libbase_ver': 307740,
},
'includes': [
'libmetrics.gypi',
],
}

View File

@ -94,6 +94,7 @@
'<(proto_in_dir)/chrome_user_metrics_extension.proto',
'<(proto_in_dir)/histogram_event.proto',
'<(proto_in_dir)/omnibox_event.proto',
'<(proto_in_dir)/omnibox_input_type.proto',
'<(proto_in_dir)/perf_data.proto',
'<(proto_in_dir)/profiler_event.proto',
'<(proto_in_dir)/sampled_profile.proto',

View File

@ -9,8 +9,8 @@
#include <string>
#include <vector>
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@ -174,7 +174,7 @@ bool SerializationUtils::WriteMetricToFile(const MetricSample& sample,
READ_WRITE_ALL_FILE_FLAGS));
if (file_descriptor.get() < 0) {
DLOG(ERROR) << "error openning the file";
DLOG(ERROR) << "error opening the file";
return false;
}
@ -196,16 +196,15 @@ bool SerializationUtils::WriteMetricToFile(const MetricSample& sample,
// The file containing the metrics samples will only be read by programs on
// the same device so we do not check endianness.
if (base::WriteFileDescriptor(file_descriptor.get(),
if (!base::WriteFileDescriptor(file_descriptor.get(),
reinterpret_cast<char*>(&size),
sizeof(size)) != sizeof(size)) {
sizeof(size))) {
DPLOG(ERROR) << "error writing message length";
return false;
}
if (base::WriteFileDescriptor(
file_descriptor.get(), msg.c_str(), msg.size()) !=
static_cast<int>(msg.size())) {
if (!base::WriteFileDescriptor(
file_descriptor.get(), msg.c_str(), msg.size())) {
DPLOG(ERROR) << "error writing message";
return false;
}

View File

@ -4,7 +4,7 @@
#include "metrics/serialization/serialization_utils.h"
#include <base/file_util.h>
#include <base/files/file_util.h>
#include <base/files/scoped_temp_dir.h>
#include <base/logging.h>
#include <base/strings/stringprintf.h>

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "uploader/system_profile_cache.h"
#include "metrics/uploader/system_profile_cache.h"
#include <glib.h>
#include <string>