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

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

Issue 54863002: Implement a salt for MediaSource IDs that can be cleared by a user. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
(...skipping 29 matching lines...) Expand all
40 #include "chrome/browser/extensions/extension_system.h" 40 #include "chrome/browser/extensions/extension_system.h"
41 #include "chrome/browser/extensions/extension_web_ui.h" 41 #include "chrome/browser/extensions/extension_web_ui.h"
42 #include "chrome/browser/extensions/extension_webkit_preferences.h" 42 #include "chrome/browser/extensions/extension_webkit_preferences.h"
43 #include "chrome/browser/extensions/suggest_permission_util.h" 43 #include "chrome/browser/extensions/suggest_permission_util.h"
44 #include "chrome/browser/geolocation/chrome_access_token_store.h" 44 #include "chrome/browser/geolocation/chrome_access_token_store.h"
45 #include "chrome/browser/google/google_util.h" 45 #include "chrome/browser/google/google_util.h"
46 #include "chrome/browser/guestview/adview/adview_guest.h" 46 #include "chrome/browser/guestview/adview/adview_guest.h"
47 #include "chrome/browser/guestview/guestview_constants.h" 47 #include "chrome/browser/guestview/guestview_constants.h"
48 #include "chrome/browser/guestview/webview/webview_guest.h" 48 #include "chrome/browser/guestview/webview/webview_guest.h"
49 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 49 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
50 #include "chrome/browser/media/media_device_id_salt.h"
50 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" 51 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
51 #include "chrome/browser/nacl_host/nacl_browser.h" 52 #include "chrome/browser/nacl_host/nacl_browser.h"
52 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" 53 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
53 #include "chrome/browser/nacl_host/nacl_host_message_filter.h" 54 #include "chrome/browser/nacl_host/nacl_host_message_filter.h"
54 #include "chrome/browser/nacl_host/nacl_process_host.h" 55 #include "chrome/browser/nacl_host/nacl_process_host.h"
55 #include "chrome/browser/net/chrome_net_log.h" 56 #include "chrome/browser/net/chrome_net_log.h"
56 #include "chrome/browser/notifications/desktop_notification_service.h" 57 #include "chrome/browser/notifications/desktop_notification_service.h"
57 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 58 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
58 #include "chrome/browser/platform_util.h" 59 #include "chrome/browser/platform_util.h"
59 #include "chrome/browser/plugins/plugin_info_message_filter.h" 60 #include "chrome/browser/plugins/plugin_info_message_filter.h"
(...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after
2373 } 2374 }
2374 2375
2375 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { 2376 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
2376 return DownloadPrefs::GetDefaultDownloadDirectory(); 2377 return DownloadPrefs::GetDefaultDownloadDirectory();
2377 } 2378 }
2378 2379
2379 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { 2380 std::string ChromeContentBrowserClient::GetDefaultDownloadName() {
2380 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); 2381 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME);
2381 } 2382 }
2382 2383
2384 std::string ChromeContentBrowserClient::GetDeviceIdSalt(
Jói 2013/10/31 16:14:47 Should this name match the other, i.e. GetMediaDev
perkj_chrome 2013/10/31 17:05:44 Done.
2385 content::ResourceContext* rc) {
2386 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
2387 ProfileIOData* io_data = ProfileIOData::FromResourceContext(rc);
2388
2389 return io_data->media_device_id_salt();
2390 }
2391
2383 void ChromeContentBrowserClient::DidCreatePpapiPlugin( 2392 void ChromeContentBrowserClient::DidCreatePpapiPlugin(
2384 content::BrowserPpapiHost* browser_host) { 2393 content::BrowserPpapiHost* browser_host) {
2385 #if defined(ENABLE_PLUGINS) 2394 #if defined(ENABLE_PLUGINS)
2386 browser_host->GetPpapiHost()->AddHostFactoryFilter( 2395 browser_host->GetPpapiHost()->AddHostFactoryFilter(
2387 scoped_ptr<ppapi::host::HostFactory>( 2396 scoped_ptr<ppapi::host::HostFactory>(
2388 new ChromeBrowserPepperHostFactory(browser_host))); 2397 new ChromeBrowserPepperHostFactory(browser_host)));
2389 #endif 2398 #endif
2390 } 2399 }
2391 2400
2392 content::BrowserPpapiHost* 2401 content::BrowserPpapiHost*
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
2638 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, 2647 return IsExtensionOrSharedModuleWhitelisted(url, extension_set,
2639 allowed_file_handle_origins_) || 2648 allowed_file_handle_origins_) ||
2640 IsHostAllowedByCommandLine(url, extension_set, 2649 IsHostAllowedByCommandLine(url, extension_set,
2641 switches::kAllowNaClFileHandleAPI); 2650 switches::kAllowNaClFileHandleAPI);
2642 #else 2651 #else
2643 return false; 2652 return false;
2644 #endif 2653 #endif
2645 } 2654 }
2646 2655
2647 } // namespace chrome 2656 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698