Chromium Code Reviews| Index: chrome/browser/ui/browser_commands.cc |
| diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc |
| index d4f38896e89e2937e0af32caab426f29c7349405..5b6f1850391706360d7d65e92a1ac810fc435e5d 100644 |
| --- a/chrome/browser/ui/browser_commands.cc |
| +++ b/chrome/browser/ui/browser_commands.cc |
| @@ -11,6 +11,8 @@ |
| #include "chrome/browser/bookmarks/bookmark_model.h" |
| #include "chrome/browser/bookmarks/bookmark_utils.h" |
| #include "chrome/browser/browser_process.h" |
| +#include "chrome/browser/browsing_data_helper.h" |
| +#include "chrome/browser/browsing_data_remover.h" |
| #include "chrome/browser/chrome_page_zoom.h" |
| #include "chrome/browser/debugger/devtools_window.h" |
| #include "chrome/browser/download/download_util.h" |
| @@ -49,6 +51,7 @@ |
| #include "chrome/browser/web_applications/web_app.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/pref_names.h" |
| +#include "content/public/browser/devtools_agent_host_registry.h" |
| #include "content/public/browser/navigation_controller.h" |
| #include "content/public/browser/navigation_entry.h" |
| #include "content/public/browser/page_navigator.h" |
| @@ -849,6 +852,21 @@ void ToggleFullscreenMode(Browser* browser) { |
| browser->fullscreen_controller()->ToggleFullscreenMode(); |
| } |
| +void ClearCache(Browser* browser) { |
| + BrowsingDataRemover* remover = new BrowsingDataRemover(browser->profile(), |
| + BrowsingDataRemover::EVERYTHING, |
| + base::Time()); |
| + remover->Remove(BrowsingDataRemover::REMOVE_CACHE, |
| + BrowsingDataHelper::UNPROTECTED_WEB); |
| + // BrowsingDataRemover takes care of deleting itself when done. |
| +} |
| + |
| +bool IsDebuggerAttachedToCurrentTab(Browser* browser) { |
| + WebContents* contents = chrome::GetActiveWebContents(browser); |
| + return contents != NULL ? |
|
Ben Goodger (Google)
2012/07/11 16:14:32
contents ?
|
| + content::DevToolsAgentHostRegistry::IsDebuggerAttached(contents) : false; |
| +} |
| + |
| void ViewSource(Browser* browser, TabContents* contents) { |
| DCHECK(contents); |