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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10413072: Teaching BrowsingDataRemover how to delete application data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bernhard. Created 8 years, 6 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 | Annotate | Revision Log
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 "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
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/string_tokenizer.h" 13 #include "base/string_tokenizer.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/app/breakpad_mac.h" 15 #include "chrome/app/breakpad_mac.h"
16 #include "chrome/browser/browser_about_handler.h" 16 #include "chrome/browser/browser_about_handler.h"
17 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/browsing_data_helper.h"
18 #include "chrome/browser/browsing_data_remover.h" 19 #include "chrome/browser/browsing_data_remover.h"
19 #include "chrome/browser/character_encoding.h" 20 #include "chrome/browser/character_encoding.h"
20 #include "chrome/browser/chrome_benchmarking_message_filter.h" 21 #include "chrome/browser/chrome_benchmarking_message_filter.h"
21 #include "chrome/browser/chrome_quota_permission_context.h" 22 #include "chrome/browser/chrome_quota_permission_context.h"
22 #include "chrome/browser/content_settings/content_settings_utils.h" 23 #include "chrome/browser/content_settings/content_settings_utils.h"
23 #include "chrome/browser/content_settings/cookie_settings.h" 24 #include "chrome/browser/content_settings/cookie_settings.h"
24 #include "chrome/browser/content_settings/host_content_settings_map.h" 25 #include "chrome/browser/content_settings/host_content_settings_map.h"
25 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 26 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
26 #include "chrome/browser/defaults.h" 27 #include "chrome/browser/defaults.h"
27 #include "chrome/browser/download/download_util.h" 28 #include "chrome/browser/download/download_util.h"
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 handler->AddHandlerPair(&HandleWebUI, 1504 handler->AddHandlerPair(&HandleWebUI,
1504 BrowserURLHandler::null_handler()); 1505 BrowserURLHandler::null_handler());
1505 } 1506 }
1506 1507
1507 void ChromeContentBrowserClient::ClearCache(RenderViewHost* rvh) { 1508 void ChromeContentBrowserClient::ClearCache(RenderViewHost* rvh) {
1508 Profile* profile = Profile::FromBrowserContext( 1509 Profile* profile = Profile::FromBrowserContext(
1509 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); 1510 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext());
1510 BrowsingDataRemover* remover = new BrowsingDataRemover(profile, 1511 BrowsingDataRemover* remover = new BrowsingDataRemover(profile,
1511 BrowsingDataRemover::EVERYTHING, 1512 BrowsingDataRemover::EVERYTHING,
1512 base::Time()); 1513 base::Time());
1513 remover->Remove(BrowsingDataRemover::REMOVE_CACHE); 1514 remover->Remove(BrowsingDataRemover::REMOVE_CACHE,
1515 BrowsingDataHelper::UNPROTECTED_WEB);
1514 // BrowsingDataRemover takes care of deleting itself when done. 1516 // BrowsingDataRemover takes care of deleting itself when done.
1515 } 1517 }
1516 1518
1517 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) { 1519 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) {
1518 Profile* profile = Profile::FromBrowserContext( 1520 Profile* profile = Profile::FromBrowserContext(
1519 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); 1521 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext());
1520 BrowsingDataRemover* remover = new BrowsingDataRemover(profile, 1522 BrowsingDataRemover* remover = new BrowsingDataRemover(profile,
1521 BrowsingDataRemover::EVERYTHING, 1523 BrowsingDataRemover::EVERYTHING,
1522 base::Time()); 1524 base::Time());
1523 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA; 1525 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA;
1524 remover->Remove(remove_mask); 1526 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB);
1525 // BrowsingDataRemover takes care of deleting itself when done. 1527 // BrowsingDataRemover takes care of deleting itself when done.
1526 } 1528 }
1527 1529
1528 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { 1530 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
1529 return download_util::GetDefaultDownloadDirectory(); 1531 return download_util::GetDefaultDownloadDirectory();
1530 } 1532 }
1531 1533
1532 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { 1534 std::string ChromeContentBrowserClient::GetDefaultDownloadName() {
1533 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); 1535 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME);
1534 } 1536 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 #if defined(USE_NSS) 1615 #if defined(USE_NSS)
1614 crypto::CryptoModuleBlockingPasswordDelegate* 1616 crypto::CryptoModuleBlockingPasswordDelegate*
1615 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 1617 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
1616 const GURL& url) { 1618 const GURL& url) {
1617 return browser::NewCryptoModuleBlockingDialogDelegate( 1619 return browser::NewCryptoModuleBlockingDialogDelegate(
1618 browser::kCryptoModulePasswordKeygen, url.host()); 1620 browser::kCryptoModulePasswordKeygen, url.host());
1619 } 1621 }
1620 #endif 1622 #endif
1621 1623
1622 } // namespace chrome 1624 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_remover_unittest.cc ('k') | chrome/browser/extensions/api/browsing_data/browsing_data_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698