Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73b40b46 authored by Alex Vakulenko's avatar Alex Vakulenko Committed by chrome-internal-fetch
Browse files

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: default avatarBertrand Simonnet <bsimonnet@chromium.org>
Tested-by: default avatarAlex Vakulenko <avakulenko@chromium.org>
Reviewed-by: default avatarMike Frysinger <vapier@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
parent 788d3b63
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
{
  'variables': {
    'libbase_ver': 293518,
    'libbase_ver': 307740,
  },
  'includes': [
    '../metrics/libmetrics.gypi',
    'libmetrics.gypi',
  ],
}
+1 −0
Original line number Diff line number Diff line
@@ -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',
+6 −7
Original line number Diff line number Diff line
@@ -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;
  }
+1 −1
Original line number Diff line number Diff line
@@ -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>
+1 −1
Original line number Diff line number Diff line
@@ -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>
Loading