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

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

Issue 20990005: Web MIDI: implement permission infobar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review #2 and #10 Created 7 years, 4 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 | 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/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/download/download_service.h" 21 #include "chrome/browser/download/download_service.h"
22 #include "chrome/browser/download/download_service_factory.h" 22 #include "chrome/browser/download/download_service_factory.h"
23 #include "chrome/browser/extensions/api/web_request/web_request_api.h" 23 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
24 #include "chrome/browser/extensions/extension_info_map.h" 24 #include "chrome/browser/extensions/extension_info_map.h"
25 #include "chrome/browser/extensions/extension_service.h" 25 #include "chrome/browser/extensions/extension_service.h"
26 #include "chrome/browser/extensions/extension_special_storage_policy.h" 26 #include "chrome/browser/extensions/extension_special_storage_policy.h"
27 #include "chrome/browser/extensions/extension_system.h" 27 #include "chrome/browser/extensions/extension_system.h"
28 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" 28 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
29 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto ry.h" 29 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto ry.h"
30 #include "chrome/browser/io_thread.h" 30 #include "chrome/browser/io_thread.h"
31 #include "chrome/browser/media/chrome_midi_permission_context.h"
32 #include "chrome/browser/media/chrome_midi_permission_context_factory.h"
31 #include "chrome/browser/net/pref_proxy_config_tracker.h" 33 #include "chrome/browser/net/pref_proxy_config_tracker.h"
32 #include "chrome/browser/net/proxy_service_factory.h" 34 #include "chrome/browser/net/proxy_service_factory.h"
33 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" 35 #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
34 #include "chrome/browser/plugins/plugin_prefs.h" 36 #include "chrome/browser/plugins/plugin_prefs.h"
35 #include "chrome/browser/prefs/incognito_mode_prefs.h" 37 #include "chrome/browser/prefs/incognito_mode_prefs.h"
36 #include "chrome/browser/prefs/pref_service_syncable.h" 38 #include "chrome/browser/prefs/pref_service_syncable.h"
37 #include "chrome/browser/themes/theme_service.h" 39 #include "chrome/browser/themes/theme_service.h"
38 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 40 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
39 #include "chrome/common/chrome_constants.h" 41 #include "chrome/common/chrome_constants.h"
40 #include "chrome/common/chrome_paths.h" 42 #include "chrome/common/chrome_paths.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 bool in_memory) { 286 bool in_memory) {
285 return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory) 287 return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory)
286 .get(); 288 .get();
287 } 289 }
288 290
289 void OffTheRecordProfileImpl::RequestMIDISysExPermission( 291 void OffTheRecordProfileImpl::RequestMIDISysExPermission(
290 int render_process_id, 292 int render_process_id,
291 int render_view_id, 293 int render_view_id,
292 const GURL& requesting_frame, 294 const GURL& requesting_frame,
293 const MIDISysExPermissionCallback& callback) { 295 const MIDISysExPermissionCallback& callback) {
294 // TODO(toyoshim): Implement. http://crbug.com/257618 . 296 ChromeMIDIPermissionContext* context =
295 callback.Run(false); 297 ChromeMIDIPermissionContextFactory::GetForProfile(this);
298 context->RequestMIDISysExPermission(render_process_id,
299 render_view_id,
300 requesting_frame,
301 callback);
296 } 302 }
297 303
298 net::URLRequestContextGetter* 304 net::URLRequestContextGetter*
299 OffTheRecordProfileImpl::GetRequestContextForExtensions() { 305 OffTheRecordProfileImpl::GetRequestContextForExtensions() {
300 return io_data_.GetExtensionsRequestContextGetter().get(); 306 return io_data_.GetExtensionsRequestContextGetter().get();
301 } 307 }
302 308
303 net::URLRequestContextGetter* 309 net::URLRequestContextGetter*
304 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( 310 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition(
305 const base::FilePath& partition_path, 311 const base::FilePath& partition_path,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 #if defined(OS_CHROMEOS) 490 #if defined(OS_CHROMEOS)
485 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 491 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
486 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 492 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
487 g_browser_process->local_state()); 493 g_browser_process->local_state());
488 } 494 }
489 #endif // defined(OS_CHROMEOS) 495 #endif // defined(OS_CHROMEOS)
490 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 496 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
491 GetPrefs(), g_browser_process->local_state()); 497 GetPrefs(), g_browser_process->local_state());
492 } 498 }
493 499
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698