Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: content/renderer/render_view_impl.cc

Issue 1457963002: Use scoped_ptr instead of linked_ptr from /content/renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android compile error Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index c72cf6d1fe7355cb8d0dbf95ba3a673ec65a734e..fb53fa455ee617115526282ee1fe7caadeb7ee12 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -713,16 +713,14 @@ void RenderViewImpl::Initialize(const ViewMsg_New_Params& params,
main_render_frame_->Initialize();
#if defined(OS_ANDROID)
- content_detectors_.push_back(linked_ptr<ContentDetector>(
- new AddressDetector()));
+ content_detectors_.push_back(make_scoped_ptr(new AddressDetector()));
const std::string& contry_iso =
params.renderer_preferences.network_contry_iso;
if (!contry_iso.empty()) {
- content_detectors_.push_back(linked_ptr<ContentDetector>(
- new PhoneNumberDetector(contry_iso)));
+ content_detectors_.push_back(
+ make_scoped_ptr(new PhoneNumberDetector(contry_iso)));
}
- content_detectors_.push_back(linked_ptr<ContentDetector>(
- new EmailDetector()));
+ content_detectors_.push_back(make_scoped_ptr(new EmailDetector()));
#endif
RenderThread::Get()->AddRoute(routing_id_, this);
@@ -3344,8 +3342,8 @@ bool RenderViewImpl::ScheduleFileChooser(
return false;
}
- file_chooser_completions_.push_back(linked_ptr<PendingFileChooser>(
- new PendingFileChooser(params, completion)));
+ file_chooser_completions_.push_back(
+ make_scoped_ptr(new PendingFileChooser(params, completion)));
if (file_chooser_completions_.size() == 1) {
// Actually show the browse dialog when this is the first request.
Send(new ViewHostMsg_RunFileChooser(routing_id_, params));
@@ -3442,9 +3440,8 @@ WebContentDetectionResult RenderViewImpl::detectContentAround(
// Process the position with all the registered content detectors until
// a match is found. Priority is provided by their relative order.
- for (ContentDetectorList::const_iterator it = content_detectors_.begin();
- it != content_detectors_.end(); ++it) {
- ContentDetector::Result content = (*it)->FindTappedContent(touch_hit);
+ for (const auto& detector : content_detectors_) {
+ ContentDetector::Result content = detector->FindTappedContent(touch_hit);
if (content.valid) {
return WebContentDetectionResult(content.content_boundaries,
base::UTF8ToUTF16(content.text), content.intent_url);
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698