Loosen up heuristics for detecting account creation forms.
[chromium-blink-merge.git] / android_webview / lib / aw_content_browser_client.cc
blob2a07343e799bf0e3d319f988884755e51a0d4538
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
3 // found in the LICENSE file.
5 #include "android_webview/lib/aw_content_browser_client.h"
7 #include "android_webview/browser/aw_cookie_access_policy.h"
8 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h"
10 namespace android_webview {
12 AwContentBrowserClient::AwContentBrowserClient()
13 : ChromeContentBrowserClient() {
16 AwContentBrowserClient::~AwContentBrowserClient() {
19 void AwContentBrowserClient::ResourceDispatcherHostCreated() {
20 ChromeContentBrowserClient::ResourceDispatcherHostCreated();
21 AwResourceDispatcherHostDelegate::ResourceDispatcherHostCreated();
24 bool AwContentBrowserClient::AllowGetCookie(const GURL& url,
25 const GURL& first_party,
26 const net::CookieList& cookie_list,
27 content::ResourceContext* context,
28 int render_process_id,
29 int render_view_id) {
30 // Not base-calling into ChromeContentBrowserClient as we are not dependent
31 // on chrome/ for any cookie policy decisions.
32 return AwCookieAccessPolicy::GetInstance()->AllowGetCookie(url,
33 first_party,
34 cookie_list,
35 context,
36 render_process_id,
37 render_view_id);
40 bool AwContentBrowserClient::AllowSetCookie(const GURL& url,
41 const GURL& first_party,
42 const std::string& cookie_line,
43 content::ResourceContext* context,
44 int render_process_id,
45 int render_view_id,
46 net::CookieOptions* options) {
47 // Not base-calling into ChromeContentBrowserClient as we are not dependent
48 // on chrome/ for any cookie policy decisions.
49 return AwCookieAccessPolicy::GetInstance()->AllowSetCookie(url,
50 first_party,
51 cookie_line,
52 context,
53 render_process_id,
54 render_view_id,
55 options);
58 } // namespace android_webview