summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2014-11-05 21:09:14 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-06 05:09:41 +0000
commit6601f743be864cd37bf55c7c8643f21c2eeb7ffe (patch)
tree57074fbd7a6115f03faba48852248b4529e0431d
parent510ed8e880ae17f79a84c2ed3bc1a87300a83119 (diff)
downloadchromium_src-6601f743be864cd37bf55c7c8643f21c2eeb7ffe.zip
chromium_src-6601f743be864cd37bf55c7c8643f21c2eeb7ffe.tar.gz
chromium_src-6601f743be864cd37bf55c7c8643f21c2eeb7ffe.tar.bz2
Do not use vector<scoped_ptr<>>.
It requires library support so that vector knows about move-only types. This is a C++11 library feature, and these aren't allowed yet as they don't work on all platforms yet. BUG=none Review URL: https://codereview.chromium.org/700723004 Cr-Commit-Position: refs/heads/master@{#302964}
-rw-r--r--chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc2
-rw-r--r--chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h4
-rw-r--r--media/midi/midi_manager_win.cc6
-rw-r--r--media/midi/midi_manager_win.h6
-rw-r--r--win8/metro_driver/print_document_source.cc2
-rw-r--r--win8/metro_driver/print_document_source.h4
6 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc b/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc
index 8aa57a5..9b9aa4e 100644
--- a/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc
+++ b/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc
@@ -62,7 +62,7 @@ void AccessibilityFocusRingController::Update() {
layers_.resize(rings_.size());
for (size_t i = 0; i < rings_.size(); ++i) {
if (!layers_[i])
- layers_[i].reset(new AccessibilityFocusRingLayer(this));
+ layers_[i] = new AccessibilityFocusRingLayer(this);
if (i > 0) {
// Focus rings other than the first one don't animate.
diff --git a/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h b/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h
index 2ab3e7a..0bd201f 100644
--- a/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h
+++ b/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h
@@ -8,7 +8,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/memory/singleton.h"
#include "base/time/time.h"
#include "chrome/browser/chromeos/ui/accessibility_focus_ring_layer.h"
@@ -69,7 +69,7 @@ class AccessibilityFocusRingController
std::vector<gfx::Rect> rects_;
std::vector<AccessibilityFocusRing> previous_rings_;
std::vector<AccessibilityFocusRing> rings_;
- std::vector<scoped_ptr<AccessibilityFocusRingLayer> > layers_;
+ ScopedVector<AccessibilityFocusRingLayer> layers_;
base::TimeTicks focus_change_time_;
ui::Compositor* compositor_;
diff --git a/media/midi/midi_manager_win.cc b/media/midi/midi_manager_win.cc
index 439ce93..bc4b15d 100644
--- a/media/midi/midi_manager_win.cc
+++ b/media/midi/midi_manager_win.cc
@@ -518,7 +518,7 @@ void MidiManagerWin::StartInitialization() {
base::IntToString(static_cast<int>(caps.vDriverVersion)));
AddInputPort(info);
in_device->set_port_index(inport_index++);
- in_devices_.push_back(in_device.Pass());
+ in_devices_.push_back(in_device.release());
}
const UINT num_out_devices = midiOutGetNumDevs();
@@ -540,7 +540,7 @@ void MidiManagerWin::StartInitialization() {
base::WideToUTF8(caps.szPname),
base::IntToString(static_cast<int>(caps.vDriverVersion)));
AddOutputPort(info);
- out_devices_.push_back(out_port.Pass());
+ out_devices_.push_back(out_port.release());
}
CompleteInitialization(MIDI_OK);
@@ -575,7 +575,7 @@ void MidiManagerWin::DispatchSendMidiData(MidiManagerClient* client,
if (!send_thread_.IsRunning())
send_thread_.Start();
- OutDeviceInfo* out_port = out_devices_[port_index].get();
+ OutDeviceInfo* out_port = out_devices_[port_index];
send_thread_.message_loop()->PostDelayedTask(
FROM_HERE,
base::Bind(&OutDeviceInfo::Send, base::Unretained(out_port), data),
diff --git a/media/midi/midi_manager_win.h b/media/midi/midi_manager_win.h
index 63096ab..ff40e98 100644
--- a/media/midi/midi_manager_win.h
+++ b/media/midi/midi_manager_win.h
@@ -8,7 +8,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/threading/thread.h"
#include "media/midi/midi_manager.h"
@@ -29,8 +29,8 @@ class MidiManagerWin : public MidiManager {
private:
class InDeviceInfo;
class OutDeviceInfo;
- std::vector<scoped_ptr<InDeviceInfo> > in_devices_;
- std::vector<scoped_ptr<OutDeviceInfo> > out_devices_;
+ ScopedVector<InDeviceInfo> in_devices_;
+ ScopedVector<OutDeviceInfo> out_devices_;
base::Thread send_thread_;
DISALLOW_COPY_AND_ASSIGN(MidiManagerWin);
};
diff --git a/win8/metro_driver/print_document_source.cc b/win8/metro_driver/print_document_source.cc
index 34ce227..9d2a0c4 100644
--- a/win8/metro_driver/print_document_source.cc
+++ b/win8/metro_driver/print_document_source.cc
@@ -393,7 +393,7 @@ void PrintDocumentSource::SetPageCount(size_t page_count) {
pages_ready_state_.resize(page_count);
for (size_t i = 0; i < page_count; ++i)
- pages_ready_state_[i].reset(new base::ConditionVariable(parent_lock_));
+ pages_ready_state_[i] = new base::ConditionVariable(parent_lock_);
}
page_count_ready_.Signal();
}
diff --git a/win8/metro_driver/print_document_source.h b/win8/metro_driver/print_document_source.h
index fed333e..fbd3c17 100644
--- a/win8/metro_driver/print_document_source.h
+++ b/win8/metro_driver/print_document_source.h
@@ -13,7 +13,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/waitable_event.h"
#include "win8/metro_driver/winrt_utils.h"
@@ -125,7 +125,7 @@ class PrintDocumentSource
// variable in this vector is signaled. This is only filled when we receive
// the page count, so we must wait on page_count_ready_ before accessing
// the content of this vector.
- std::vector<scoped_ptr<base::ConditionVariable> > pages_ready_state_;
+ ScopedVector<base::ConditionVariable> pages_ready_state_;
// This event is signaled when we receive a page count from Chrome. We should
// not receive any page data before the count, so we can check this event