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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 38043004: Cancel MIDI permission request infobar on MIDIAccess stop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delay "requests_.Remove(it.GetCurrentKey());" until we're done using |it|. 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/ui/app_list/test/fake_profile.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 ProfileImpl::GetMediaRequestContextForStoragePartition( 904 ProfileImpl::GetMediaRequestContextForStoragePartition(
905 const base::FilePath& partition_path, 905 const base::FilePath& partition_path,
906 bool in_memory) { 906 bool in_memory) {
907 return io_data_ 907 return io_data_
908 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); 908 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get();
909 } 909 }
910 910
911 void ProfileImpl::RequestMIDISysExPermission( 911 void ProfileImpl::RequestMIDISysExPermission(
912 int render_process_id, 912 int render_process_id,
913 int render_view_id, 913 int render_view_id,
914 int bridge_id,
914 const GURL& requesting_frame, 915 const GURL& requesting_frame,
915 const MIDISysExPermissionCallback& callback) { 916 const MIDISysExPermissionCallback& callback) {
916 ChromeMIDIPermissionContext* context = 917 ChromeMIDIPermissionContext* context =
917 ChromeMIDIPermissionContextFactory::GetForProfile(this); 918 ChromeMIDIPermissionContextFactory::GetForProfile(this);
918 context->RequestMIDISysExPermission(render_process_id, 919 context->RequestMIDISysExPermission(render_process_id,
919 render_view_id, 920 render_view_id,
921 bridge_id,
920 requesting_frame, 922 requesting_frame,
921 callback); 923 callback);
922 } 924 }
923 925
926 void ProfileImpl::CancelMIDISysExPermissionRequest(
927 int render_process_id,
928 int render_view_id,
929 int bridge_id,
930 const GURL& requesting_frame) {
931 ChromeMIDIPermissionContext* context =
932 ChromeMIDIPermissionContextFactory::GetForProfile(this);
933 context->CancelMIDISysExPermissionRequest(
934 render_process_id, render_view_id, bridge_id, requesting_frame);
935 }
936
924 content::ResourceContext* ProfileImpl::GetResourceContext() { 937 content::ResourceContext* ProfileImpl::GetResourceContext() {
925 return io_data_.GetResourceContext(); 938 return io_data_.GetResourceContext();
926 } 939 }
927 940
928 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { 941 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() {
929 return io_data_.GetExtensionsRequestContextGetter().get(); 942 return io_data_.GetExtensionsRequestContextGetter().get();
930 } 943 }
931 944
932 net::URLRequestContextGetter* 945 net::URLRequestContextGetter*
933 ProfileImpl::CreateRequestContextForStoragePartition( 946 ProfileImpl::CreateRequestContextForStoragePartition(
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { 1238 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() {
1226 #if defined(OS_CHROMEOS) 1239 #if defined(OS_CHROMEOS)
1227 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 1240 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
1228 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 1241 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
1229 g_browser_process->local_state()); 1242 g_browser_process->local_state());
1230 } 1243 }
1231 #endif // defined(OS_CHROMEOS) 1244 #endif // defined(OS_CHROMEOS)
1232 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 1245 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
1233 GetPrefs(), g_browser_process->local_state()); 1246 GetPrefs(), g_browser_process->local_state());
1234 } 1247 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/ui/app_list/test/fake_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698