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

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

Issue 2618393003: Remove ScopedVector from ContentBrowserClient. (Closed)
Patch Set: rebase 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 content::RenderViewHost* rvh, 493 content::RenderViewHost* rvh,
494 content::WebPreferences* web_prefs) { 494 content::WebPreferences* web_prefs) {
495 if (!preferences_populater_.get()) { 495 if (!preferences_populater_.get()) {
496 preferences_populater_ = 496 preferences_populater_ =
497 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater()); 497 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater());
498 } 498 }
499 preferences_populater_->PopulateFor( 499 preferences_populater_->PopulateFor(
500 content::WebContents::FromRenderViewHost(rvh), web_prefs); 500 content::WebContents::FromRenderViewHost(rvh), web_prefs);
501 } 501 }
502 502
503 ScopedVector<content::NavigationThrottle> 503 std::vector<std::unique_ptr<content::NavigationThrottle>>
504 AwContentBrowserClient::CreateThrottlesForNavigation( 504 AwContentBrowserClient::CreateThrottlesForNavigation(
505 content::NavigationHandle* navigation_handle) { 505 content::NavigationHandle* navigation_handle) {
506 ScopedVector<content::NavigationThrottle> throttles; 506 std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
507 // We allow intercepting only navigations within main frames. This 507 // We allow intercepting only navigations within main frames. This
508 // is used to post onPageStarted. We handle shouldOverrideUrlLoading 508 // is used to post onPageStarted. We handle shouldOverrideUrlLoading
509 // via a sync IPC. 509 // via a sync IPC.
510 if (navigation_handle->IsInMainFrame()) { 510 if (navigation_handle->IsInMainFrame()) {
511 throttles.push_back( 511 throttles.push_back(
512 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( 512 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor(
513 navigation_handle)); 513 navigation_handle));
514 } 514 }
515 return throttles; 515 return throttles;
516 } 516 }
(...skipping 27 matching lines...) Expand all
544 render_frame_host)); 544 render_frame_host));
545 545
546 // Although WebView does not support password manager feature, renderer code 546 // Although WebView does not support password manager feature, renderer code
547 // could still request this interface, so we register a dummy binder which 547 // could still request this interface, so we register a dummy binder which
548 // just drops the incoming request, to avoid the 'Failed to locate a binder 548 // just drops the incoming request, to avoid the 'Failed to locate a binder
549 // for interface' error log.. 549 // for interface' error log..
550 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); 550 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver));
551 } 551 }
552 552
553 } // namespace android_webview 553 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_content_browser_client.h ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698