aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuis Hector Chavez <lhchavez@google.com>2016-05-31 23:30:06 +0000
committerLuis Hector Chavez <lhchavez@google.com>2016-05-31 23:34:09 +0000
commitabfe7a063bbaebdca8703d27137c8c9aed826dac (patch)
treee66b0fb458a71a808fdb7bf880c6b1ed1882bcbe /src
parent43625e411feabd7df36a8768ba8c4eca58a22e4d (diff)
downloadlibweave-abfe7a063bbaebdca8703d27137c8c9aed826dac.tar.gz
Revert "Merge remote-tracking branch 'weave/master' into 'weave/aosp-master'"
This reverts commit 43625e411feabd7df36a8768ba8c4eca58a22e4d. This needs to happen in a staged fashion to avoid build breakages :/ Change-Id: Ie5474629bd301d7af27ee6167988b0381ac73271 Reviewed-on: https://weave-review.googlesource.com/3700 Reviewed-by: Luis Hector Chavez <lhchavez@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/access_revocation_manager_impl.cc6
-rw-r--r--src/bind_lambda.h4
-rw-r--r--src/privet/privet_handler.cc3
-rw-r--r--src/privet/privet_handler.h1
-rw-r--r--src/privet/privet_types.h1
-rw-r--r--src/streams.h2
6 files changed, 4 insertions, 13 deletions
diff --git a/src/access_revocation_manager_impl.cc b/src/access_revocation_manager_impl.cc
index 1c051de..93bdf3f 100644
--- a/src/access_revocation_manager_impl.cc
+++ b/src/access_revocation_manager_impl.cc
@@ -4,11 +4,8 @@
#include "src/access_revocation_manager_impl.h"
-#include <memory>
-
#include <base/json/json_reader.h>
#include <base/json/json_writer.h>
-#include <base/memory/ptr_util.h>
#include <base/values.h>
#include "src/commands/schema_constants.h"
@@ -73,8 +70,7 @@ void AccessRevocationManagerImpl::Save(const DoneCallback& callback) {
base::ListValue list;
for (const auto& e : entries_) {
- std::unique_ptr<base::DictionaryValue> entry =
- base::MakeUnique<base::DictionaryValue>();
+ scoped_ptr<base::DictionaryValue> entry{new base::DictionaryValue};
entry->SetString(kUser, Base64Encode(e.user_id));
entry->SetString(kApp, Base64Encode(e.app_id));
entry->SetInteger(kRevocation, ToJ2000Time(e.revocation));
diff --git a/src/bind_lambda.h b/src/bind_lambda.h
index 164e3e4..e6f367c 100644
--- a/src/bind_lambda.h
+++ b/src/bind_lambda.h
@@ -31,7 +31,7 @@ class LambdaAdapter<Lambda, R (Lambda::*)(Args... args)> {
public:
typedef R(RunType)(Args...);
LambdaAdapter(Lambda lambda) : lambda_(lambda) {}
- R Run(Args... args) { return lambda_(std::forward<Args>(args)...); }
+ R Run(Args... args) { return lambda_(CallbackForward(args)...); }
private:
Lambda lambda_;
@@ -43,7 +43,7 @@ class LambdaAdapter<Lambda, R (Lambda::*)(Args... args) const> {
public:
typedef R(RunType)(Args...);
LambdaAdapter(Lambda lambda) : lambda_(lambda) {}
- R Run(Args... args) { return lambda_(std::forward<Args>(args)...); }
+ R Run(Args... args) { return lambda_(CallbackForward(args)...); }
private:
Lambda lambda_;
diff --git a/src/privet/privet_handler.cc b/src/privet/privet_handler.cc
index ada9f44..42a1c23 100644
--- a/src/privet/privet_handler.cc
+++ b/src/privet/privet_handler.cc
@@ -711,8 +711,7 @@ void PrivetHandler::HandleAuth(const base::DictionaryValue& input,
return ReturnError(*error, callback);
}
- CHECK_LE(static_cast<int32_t>(access_token_scope),
- static_cast<int32_t>(desired_scope));
+ CHECK_LE(access_token_scope, desired_scope);
if (access_token_scope < acceptable_scope) {
Error::AddToPrintf(&error, FROM_HERE, errors::kAccessDenied,
diff --git a/src/privet/privet_handler.h b/src/privet/privet_handler.h
index eab1aa3..e64151b 100644
--- a/src/privet/privet_handler.h
+++ b/src/privet/privet_handler.h
@@ -12,7 +12,6 @@
#include <base/macros.h>
#include <base/memory/weak_ptr.h>
#include <base/time/default_clock.h>
-#include <weave/settings.h>
#include "src/privet/cloud_delegate.h"
diff --git a/src/privet/privet_types.h b/src/privet/privet_types.h
index 2a290d4..44be96f 100644
--- a/src/privet/privet_types.h
+++ b/src/privet/privet_types.h
@@ -6,7 +6,6 @@
#define LIBWEAVE_SRC_PRIVET_PRIVET_TYPES_H_
#include <string>
-#include <vector>
#include <base/logging.h>
#include <weave/error.h>
diff --git a/src/streams.h b/src/streams.h
index cefcf94..990f47c 100644
--- a/src/streams.h
+++ b/src/streams.h
@@ -5,8 +5,6 @@
#ifndef LIBWEAVE_SRC_STREAMS_H_
#define LIBWEAVE_SRC_STREAMS_H_
-#include <vector>
-
#include <base/memory/weak_ptr.h>
#include <weave/stream.h>