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

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/password_manager/chrome_password_manager_client.h" 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 } 675 }
676 676
677 const password_manager::LogManager* ChromePasswordManagerClient::GetLogManager() 677 const password_manager::LogManager* ChromePasswordManagerClient::GetLogManager()
678 const { 678 const {
679 return log_manager_.get(); 679 return log_manager_.get();
680 } 680 }
681 681
682 // static 682 // static
683 void ChromePasswordManagerClient::BindCredentialManager( 683 void ChromePasswordManagerClient::BindCredentialManager(
684 content::RenderFrameHost* render_frame_host, 684 content::RenderFrameHost* render_frame_host,
685 const service_manager::BindSourceInfo& source_info,
685 password_manager::mojom::CredentialManagerRequest request) { 686 password_manager::mojom::CredentialManagerRequest request) {
686 content::WebContents* web_contents = 687 content::WebContents* web_contents =
687 content::WebContents::FromRenderFrameHost(render_frame_host); 688 content::WebContents::FromRenderFrameHost(render_frame_host);
688 DCHECK(web_contents); 689 DCHECK(web_contents);
689 690
690 ChromePasswordManagerClient* instance = 691 ChromePasswordManagerClient* instance =
691 ChromePasswordManagerClient::FromWebContents(web_contents); 692 ChromePasswordManagerClient::FromWebContents(web_contents);
692 693
693 // Try to bind to the driver, but if driver is not available for this render 694 // Try to bind to the driver, but if driver is not available for this render
694 // frame host, the request will be just dropped. This will cause the message 695 // frame host, the request will be just dropped. This will cause the message
695 // pipe to be closed, which will raise a connection error on the peer side. 696 // pipe to be closed, which will raise a connection error on the peer side.
696 if (!instance) 697 if (!instance)
697 return; 698 return;
698 699
699 instance->credential_manager_impl_.BindRequest(std::move(request)); 700 instance->credential_manager_impl_.BindRequest(std::move(request));
700 } 701 }
701 702
702 // static 703 // static
703 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { 704 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) {
704 std::string scheme = url.scheme(); 705 std::string scheme = url.scheme();
705 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( 706 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme(
706 scheme) && 707 scheme) &&
707 #if BUILDFLAG(ENABLE_EXTENSIONS) 708 #if BUILDFLAG(ENABLE_EXTENSIONS)
708 scheme != extensions::kExtensionScheme && 709 scheme != extensions::kExtensionScheme &&
709 #endif 710 #endif
710 scheme != content::kChromeDevToolsScheme); 711 scheme != content::kChromeDevToolsScheme);
711 } 712 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698