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

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 2618393003: Remove ScopedVector from ContentBrowserClient. (Closed)
Patch Set: chromeos Created 3 years, 11 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/browser/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 content::RenderViewHost* rvh, 498 content::RenderViewHost* rvh,
499 content::WebPreferences* web_prefs) { 499 content::WebPreferences* web_prefs) {
500 if (!preferences_populater_.get()) { 500 if (!preferences_populater_.get()) {
501 preferences_populater_ = 501 preferences_populater_ =
502 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater()); 502 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater());
503 } 503 }
504 preferences_populater_->PopulateFor( 504 preferences_populater_->PopulateFor(
505 content::WebContents::FromRenderViewHost(rvh), web_prefs); 505 content::WebContents::FromRenderViewHost(rvh), web_prefs);
506 } 506 }
507 507
508 ScopedVector<content::NavigationThrottle> 508 std::vector<std::unique_ptr<content::NavigationThrottle>>
509 AwContentBrowserClient::CreateThrottlesForNavigation( 509 AwContentBrowserClient::CreateThrottlesForNavigation(
510 content::NavigationHandle* navigation_handle) { 510 content::NavigationHandle* navigation_handle) {
511 ScopedVector<content::NavigationThrottle> throttles; 511 std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
512 // We allow intercepting only navigations within main frames. This 512 // We allow intercepting only navigations within main frames. This
513 // is used to post onPageStarted. We handle shouldOverrideUrlLoading 513 // is used to post onPageStarted. We handle shouldOverrideUrlLoading
514 // via a sync IPC. 514 // via a sync IPC.
515 if (navigation_handle->IsInMainFrame()) { 515 if (navigation_handle->IsInMainFrame()) {
516 throttles.push_back( 516 throttles.push_back(
517 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( 517 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor(
518 navigation_handle)); 518 navigation_handle));
519 } 519 }
520 return throttles; 520 return throttles;
521 } 521 }
(...skipping 27 matching lines...) Expand all
549 render_frame_host)); 549 render_frame_host));
550 550
551 // Although WebView does not support password manager feature, renderer code 551 // Although WebView does not support password manager feature, renderer code
552 // could still request this interface, so we register a dummy binder which 552 // could still request this interface, so we register a dummy binder which
553 // just drops the incoming request, to avoid the 'Failed to locate a binder 553 // just drops the incoming request, to avoid the 'Failed to locate a binder
554 // for interface' error log.. 554 // for interface' error log..
555 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); 555 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver));
556 } 556 }
557 557
558 } // namespace android_webview 558 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698