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

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 2578723002: Reduce BrowsingDataRemover's dependencies on Chrome (Closed)
Patch Set: A new callsite appeared through rebase - fixed the compilation error. Created 3 years, 11 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 void ToggleFullscreenMode(Browser* browser) { 1186 void ToggleFullscreenMode(Browser* browser) {
1187 DCHECK(browser); 1187 DCHECK(browser);
1188 browser->exclusive_access_manager() 1188 browser->exclusive_access_manager()
1189 ->fullscreen_controller() 1189 ->fullscreen_controller()
1190 ->ToggleBrowserFullscreenMode(); 1190 ->ToggleBrowserFullscreenMode();
1191 } 1191 }
1192 1192
1193 void ClearCache(Browser* browser) { 1193 void ClearCache(Browser* browser) {
1194 BrowsingDataRemover* remover = 1194 BrowsingDataRemover* remover =
1195 BrowsingDataRemoverFactory::GetForBrowserContext(browser->profile()); 1195 BrowsingDataRemoverFactory::GetForBrowserContext(browser->profile());
1196 remover->Remove(BrowsingDataRemover::Unbounded(), 1196 remover->Remove(base::Time(), base::Time::Max(),
1197 BrowsingDataRemover::REMOVE_CACHE, 1197 BrowsingDataRemover::REMOVE_CACHE,
1198 BrowsingDataHelper::UNPROTECTED_WEB); 1198 BrowsingDataHelper::UNPROTECTED_WEB);
1199 // BrowsingDataRemover takes care of deleting itself when done. 1199 // BrowsingDataRemover takes care of deleting itself when done.
1200 } 1200 }
1201 1201
1202 bool IsDebuggerAttachedToCurrentTab(Browser* browser) { 1202 bool IsDebuggerAttachedToCurrentTab(Browser* browser) {
1203 WebContents* contents = browser->tab_strip_model()->GetActiveWebContents(); 1203 WebContents* contents = browser->tab_strip_model()->GetActiveWebContents();
1204 return contents ? 1204 return contents ?
1205 content::DevToolsAgentHost::IsDebuggerAttached(contents) : false; 1205 content::DevToolsAgentHost::IsDebuggerAttached(contents) : false;
1206 } 1206 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); 1331 app_name, true /* trusted_source */, gfx::Rect(), browser->profile()));
1332 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1332 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1333 1333
1334 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1334 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1335 contents->GetRenderViewHost()->SyncRendererPrefs(); 1335 contents->GetRenderViewHost()->SyncRendererPrefs();
1336 app_browser->window()->Show(); 1336 app_browser->window()->Show();
1337 } 1337 }
1338 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 1338 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
1339 1339
1340 } // namespace chrome 1340 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ssl/chrome_ssl_host_state_delegate_test.cc ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698