shill: Compile against libchrome-180609
Made the following fixes to allow compile against a new libchrome:
- ScopedVector::reset() was renamed to "clear".
- Hack in base to add "using base::FilePath;" has been removed.
- Convert MessageLoop::current()->RunAllPending() to
base::RunLoop().RunUntilIdle().
- MessageLoopProxy::PostDelayedTask() now takes a base::TimeDelta().
- scoped_refptr::release() no longer exists.
- base/eintr_wrapper.h -> base/posix/eintr_wrapper.h
- base/scoped_temp_dir.h -> base/files/scoped_temp_dir.h
- base/string_tokenizer.h -> base/strings/string_tokenizer.h
- New scoped_ptr does compile check for naughty people making scoped_ptrs
of refcounted objects.
- base::SplitString() now returns an empty vector when given an empty
string (instead of a single-element vector with an empty string).
CQ-DEPEND=CL:43774
BUG=chromium-os:38931
TEST=Unit tests, run on real hardware
Change-Id: I6f1f5807e81fb2d52f197871d32ccbccc3038a7c
Reviewed-on: https://gerrit.chromium.org/gerrit/43775
Commit-Queue: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/manager_unittest.cc b/manager_unittest.cc
index 865b99c..1a60350 100644
--- a/manager_unittest.cc
+++ b/manager_unittest.cc
@@ -10,7 +10,7 @@
#include <glib.h>
#include <base/file_util.h>
-#include <base/scoped_temp_dir.h>
+#include <base/files/scoped_temp_dir.h>
#include <base/stl_util.h>
#include <base/stringprintf.h>
#include <chromeos/dbus/service_constants.h>
@@ -44,6 +44,7 @@
#include "shill/wifi_service.h"
#include "shill/wimax_service.h"
+using base::ScopedTempDir;
using std::map;
using std::set;
using std::string;
@@ -144,19 +145,19 @@
Profile *CreateProfileForManager(Manager *manager, GLib *glib) {
Profile::Identifier id("rather", "irrelevant");
- scoped_ptr<Profile> profile(new Profile(control_interface(),
- manager,
- id,
- "",
- false));
FilePath final_path(storage_path());
final_path = final_path.Append("test.profile");
scoped_ptr<KeyFileStore> storage(new KeyFileStore(glib));
storage->set_path(final_path);
if (!storage->Open())
return NULL;
- profile->set_storage(storage.release()); // Passes ownership.
- return profile.release();
+ Profile *profile(new Profile(control_interface(),
+ manager,
+ id,
+ "",
+ false));
+ profile->set_storage(storage.release()); // Passes ownership of "storage".
+ return profile; // Passes onwership of "profile".
}
bool CreateBackingStoreForService(ScopedTempDir *temp_dir,