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

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

Issue 7322008: Enable clear cache/cookies support in developer tools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch with fixes Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/app/breakpad_mac.h" 8 #include "chrome/app/breakpad_mac.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/browsing_data_remover.h"
10 #include "chrome/browser/character_encoding.h" 11 #include "chrome/browser/character_encoding.h"
11 #include "chrome/browser/chrome_plugin_message_filter.h" 12 #include "chrome/browser/chrome_plugin_message_filter.h"
12 #include "chrome/browser/chrome_quota_permission_context.h" 13 #include "chrome/browser/chrome_quota_permission_context.h"
13 #include "chrome/browser/chrome_worker_message_filter.h" 14 #include "chrome/browser/chrome_worker_message_filter.h"
14 #include "chrome/browser/content_settings/host_content_settings_map.h" 15 #include "chrome/browser/content_settings/host_content_settings_map.h"
15 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 16 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
16 #include "chrome/browser/extensions/extension_info_map.h" 17 #include "chrome/browser/extensions/extension_info_map.h"
17 #include "chrome/browser/extensions/extension_message_handler.h" 18 #include "chrome/browser/extensions/extension_message_handler.h"
18 #include "chrome/browser/extensions/extension_service.h" 19 #include "chrome/browser/extensions/extension_service.h"
19 #include "chrome/browser/google/google_util.h" 20 #include "chrome/browser/google/google_util.h"
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 630
630 #if defined(USE_NSS) 631 #if defined(USE_NSS)
631 crypto::CryptoModuleBlockingPasswordDelegate* 632 crypto::CryptoModuleBlockingPasswordDelegate*
632 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 633 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
633 const GURL& url) { 634 const GURL& url) {
634 return browser::NewCryptoModuleBlockingDialogDelegate( 635 return browser::NewCryptoModuleBlockingDialogDelegate(
635 browser::kCryptoModulePasswordKeygen, url.host()); 636 browser::kCryptoModulePasswordKeygen, url.host());
636 } 637 }
637 #endif 638 #endif
638 639
640 void ChromeContentBrowserClient::ClearBrowserCache(RenderViewHost* rvh) {
641 Profile* profile = rvh->site_instance()->GetProcess()->profile();
642 BrowsingDataRemover* remover = new BrowsingDataRemover(profile,
643 BrowsingDataRemover::EVERYTHING,
644 base::Time());
645 remover->Remove(BrowsingDataRemover::REMOVE_CACHE);
646 // BrowsingDataRemover takes care of deleting itself when done.
647 }
648
649 void ChromeContentBrowserClient::ClearBrowserCookies(RenderViewHost* rvh) {
650 Profile* profile = rvh->site_instance()->GetProcess()->profile();
651 BrowsingDataRemover* remover = new BrowsingDataRemover(profile,
652 BrowsingDataRemover::EVERYTHING,
653 base::Time());
654 int remove_mask = BrowsingDataRemover::REMOVE_COOKIES;
655 remover->Remove(remove_mask);
656 // BrowsingDataRemover takes care of deleting itself when done.
657 }
658
639 } // namespace chrome 659 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698