| OLD | NEW |
| 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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1518 handler->AddHandlerPair(&HandleWebUI, | 1518 handler->AddHandlerPair(&HandleWebUI, |
| 1519 BrowserURLHandler::null_handler()); | 1519 BrowserURLHandler::null_handler()); |
| 1520 } | 1520 } |
| 1521 | 1521 |
| 1522 void ChromeContentBrowserClient::ClearCache(RenderViewHost* rvh) { | 1522 void ChromeContentBrowserClient::ClearCache(RenderViewHost* rvh) { |
| 1523 Profile* profile = Profile::FromBrowserContext( | 1523 Profile* profile = Profile::FromBrowserContext( |
| 1524 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); | 1524 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); |
| 1525 BrowsingDataRemover* remover = new BrowsingDataRemover(profile, | 1525 BrowsingDataRemover* remover = new BrowsingDataRemover(profile, |
| 1526 BrowsingDataRemover::EVERYTHING, | 1526 BrowsingDataRemover::EVERYTHING, |
| 1527 base::Time()); | 1527 base::Time()); |
| 1528 remover->Remove(BrowsingDataRemover::REMOVE_CACHE); | 1528 remover->Remove(BrowsingDataRemover::REMOVE_CACHE, |
| 1529 BrowsingDataRemover::REMOVE_FROM_UNPROTECTED_ORIGINS); |
| 1529 // BrowsingDataRemover takes care of deleting itself when done. | 1530 // BrowsingDataRemover takes care of deleting itself when done. |
| 1530 } | 1531 } |
| 1531 | 1532 |
| 1532 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) { | 1533 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) { |
| 1533 Profile* profile = Profile::FromBrowserContext( | 1534 Profile* profile = Profile::FromBrowserContext( |
| 1534 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); | 1535 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); |
| 1535 BrowsingDataRemover* remover = new BrowsingDataRemover(profile, | 1536 BrowsingDataRemover* remover = new BrowsingDataRemover(profile, |
| 1536 BrowsingDataRemover::EVERYTHING, | 1537 BrowsingDataRemover::EVERYTHING, |
| 1537 base::Time()); | 1538 base::Time()); |
| 1538 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA; | 1539 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA; |
| 1539 remover->Remove(remove_mask); | 1540 remover->Remove(remove_mask, |
| 1541 BrowsingDataRemover::REMOVE_FROM_UNPROTECTED_ORIGINS); |
| 1540 // BrowsingDataRemover takes care of deleting itself when done. | 1542 // BrowsingDataRemover takes care of deleting itself when done. |
| 1541 } | 1543 } |
| 1542 | 1544 |
| 1543 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { | 1545 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { |
| 1544 return download_util::GetDefaultDownloadDirectory(); | 1546 return download_util::GetDefaultDownloadDirectory(); |
| 1545 } | 1547 } |
| 1546 | 1548 |
| 1547 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { | 1549 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { |
| 1548 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); | 1550 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); |
| 1549 } | 1551 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 #if defined(USE_NSS) | 1630 #if defined(USE_NSS) |
| 1629 crypto::CryptoModuleBlockingPasswordDelegate* | 1631 crypto::CryptoModuleBlockingPasswordDelegate* |
| 1630 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1632 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 1631 const GURL& url) { | 1633 const GURL& url) { |
| 1632 return browser::NewCryptoModuleBlockingDialogDelegate( | 1634 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 1633 browser::kCryptoModulePasswordKeygen, url.host()); | 1635 browser::kCryptoModulePasswordKeygen, url.host()); |
| 1634 } | 1636 } |
| 1635 #endif | 1637 #endif |
| 1636 | 1638 |
| 1637 } // namespace chrome | 1639 } // namespace chrome |
| OLD | NEW |