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

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

Issue 2733393003: Split browsing data masks between content and embedder (Closed)
Patch Set: Rebase (merged automatically) Created 3 years, 9 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"
11 #include "chrome/app/chrome_command_ids.h" 11 #include "chrome/app/chrome_command_ids.h"
12 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 12 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/browsing_data/browsing_data_helper.h" 14 #include "chrome/browser/browsing_data/browsing_data_helper.h"
15 #include "chrome/browser/browsing_data/browsing_data_remover.h" 15 #include "chrome/browser/browsing_data/browsing_data_remover.h"
16 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" 16 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h"
17 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h"
17 #include "chrome/browser/chrome_notification_types.h" 18 #include "chrome/browser/chrome_notification_types.h"
18 #include "chrome/browser/devtools/devtools_window.h" 19 #include "chrome/browser/devtools/devtools_window.h"
19 #include "chrome/browser/dom_distiller/tab_utils.h" 20 #include "chrome/browser/dom_distiller/tab_utils.h"
20 #include "chrome/browser/lifetime/application_lifetime.h" 21 #include "chrome/browser/lifetime/application_lifetime.h"
21 #include "chrome/browser/media/router/media_router_feature.h" 22 #include "chrome/browser/media/router/media_router_feature.h"
22 #include "chrome/browser/platform_util.h" 23 #include "chrome/browser/platform_util.h"
23 #include "chrome/browser/prefs/incognito_mode_prefs.h" 24 #include "chrome/browser/prefs/incognito_mode_prefs.h"
24 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/sessions/session_service_factory.h" 26 #include "chrome/browser/sessions/session_service_factory.h"
26 #include "chrome/browser/sessions/tab_restore_service_factory.h" 27 #include "chrome/browser/sessions/tab_restore_service_factory.h"
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 DCHECK(browser); 1196 DCHECK(browser);
1196 browser->exclusive_access_manager() 1197 browser->exclusive_access_manager()
1197 ->fullscreen_controller() 1198 ->fullscreen_controller()
1198 ->ToggleBrowserFullscreenMode(); 1199 ->ToggleBrowserFullscreenMode();
1199 } 1200 }
1200 1201
1201 void ClearCache(Browser* browser) { 1202 void ClearCache(Browser* browser) {
1202 BrowsingDataRemover* remover = 1203 BrowsingDataRemover* remover =
1203 BrowsingDataRemoverFactory::GetForBrowserContext(browser->profile()); 1204 BrowsingDataRemoverFactory::GetForBrowserContext(browser->profile());
1204 remover->Remove(base::Time(), base::Time::Max(), 1205 remover->Remove(base::Time(), base::Time::Max(),
1205 BrowsingDataRemover::REMOVE_CACHE, 1206 BrowsingDataRemover::DATA_TYPE_CACHE,
1206 BrowsingDataHelper::UNPROTECTED_WEB); 1207 BrowsingDataRemover::ORIGIN_TYPE_UNPROTECTED_WEB);
1207 // BrowsingDataRemover takes care of deleting itself when done. 1208 // BrowsingDataRemover takes care of deleting itself when done.
1208 } 1209 }
1209 1210
1210 bool IsDebuggerAttachedToCurrentTab(Browser* browser) { 1211 bool IsDebuggerAttachedToCurrentTab(Browser* browser) {
1211 WebContents* contents = browser->tab_strip_model()->GetActiveWebContents(); 1212 WebContents* contents = browser->tab_strip_model()->GetActiveWebContents();
1212 return contents ? 1213 return contents ?
1213 content::DevToolsAgentHost::IsDebuggerAttached(contents) : false; 1214 content::DevToolsAgentHost::IsDebuggerAttached(contents) : false;
1214 } 1215 }
1215 1216
1216 void ViewSource(Browser* browser, WebContents* contents) { 1217 void ViewSource(Browser* browser, WebContents* contents) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 true)); 1341 true));
1341 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1342 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1342 1343
1343 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1344 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1344 contents->GetRenderViewHost()->SyncRendererPrefs(); 1345 contents->GetRenderViewHost()->SyncRendererPrefs();
1345 app_browser->window()->Show(); 1346 app_browser->window()->Show();
1346 } 1347 }
1347 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 1348 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
1348 1349
1349 } // namespace chrome 1350 } // 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