| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/guestview/webview/webview_guest.h" | 5 #include "chrome/browser/guestview/webview/webview_guest.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/extensions/api/web_request/web_request_api.h" | 8 #include "chrome/browser/extensions/api/web_request/web_request_api.h" |
| 9 #include "chrome/browser/extensions/extension_renderer_state.h" | 9 #include "chrome/browser/extensions/extension_renderer_state.h" |
| 10 #include "chrome/browser/extensions/extension_web_contents_observer.h" | 10 #include "chrome/browser/extensions/extension_web_contents_observer.h" |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 uint32 removal_mask, | 431 uint32 removal_mask, |
| 432 const base::Closure& callback) { | 432 const base::Closure& callback) { |
| 433 content::StoragePartition* partition = | 433 content::StoragePartition* partition = |
| 434 content::BrowserContext::GetStoragePartition( | 434 content::BrowserContext::GetStoragePartition( |
| 435 web_contents()->GetBrowserContext(), | 435 web_contents()->GetBrowserContext(), |
| 436 web_contents()->GetSiteInstance()); | 436 web_contents()->GetSiteInstance()); |
| 437 | 437 |
| 438 if (!partition) | 438 if (!partition) |
| 439 return false; | 439 return false; |
| 440 | 440 |
| 441 partition->ClearDataForRange( | 441 partition->ClearData( |
| 442 removal_mask, | 442 removal_mask, |
| 443 content::StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL, | 443 content::StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL, |
| 444 NULL, |
| 445 content::StoragePartition::OriginMatcherFunction(), |
| 444 remove_since, | 446 remove_since, |
| 445 base::Time::Now(), | 447 base::Time::Now(), |
| 446 callback); | 448 callback); |
| 447 return true; | 449 return true; |
| 448 } | 450 } |
| 449 | 451 |
| 450 WebViewGuest::~WebViewGuest() { | 452 WebViewGuest::~WebViewGuest() { |
| 451 } | 453 } |
| 452 | 454 |
| 453 void WebViewGuest::DidCommitProvisionalLoadForFrame( | 455 void WebViewGuest::DidCommitProvisionalLoadForFrame( |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 | 570 |
| 569 WebViewGuest::PermissionResponseInfo::PermissionResponseInfo( | 571 WebViewGuest::PermissionResponseInfo::PermissionResponseInfo( |
| 570 const PermissionResponseCallback& callback, | 572 const PermissionResponseCallback& callback, |
| 571 bool allowed_by_default) | 573 bool allowed_by_default) |
| 572 : callback(callback), | 574 : callback(callback), |
| 573 allowed_by_default(allowed_by_default) { | 575 allowed_by_default(allowed_by_default) { |
| 574 } | 576 } |
| 575 | 577 |
| 576 WebViewGuest::PermissionResponseInfo::~PermissionResponseInfo() { | 578 WebViewGuest::PermissionResponseInfo::~PermissionResponseInfo() { |
| 577 } | 579 } |
| OLD | NEW |