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

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: disable icon for now 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 bool in_memory) { 281 bool in_memory) {
280 return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory) 282 return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory)
281 .get(); 283 .get();
282 } 284 }
283 285
284 void OffTheRecordProfileImpl::RequestMIDISysExPermission( 286 void OffTheRecordProfileImpl::RequestMIDISysExPermission(
285 int render_process_id, 287 int render_process_id,
286 int render_view_id, 288 int render_view_id,
287 const GURL& requesting_frame, 289 const GURL& requesting_frame,
288 const MIDISysExPermissionCallback& callback) { 290 const MIDISysExPermissionCallback& callback) {
289 // TODO(toyoshim): Implement. http://crbug.com/257618 . 291 ChromeMIDIPermissionContext* context =
290 callback.Run(false); 292 ChromeMIDIPermissionContextFactory::GetForProfile(this);
293 context->RequestMIDISysExPermission(render_process_id,
294 render_view_id,
295 requesting_frame,
296 callback);
291 } 297 }
292 298
293 net::URLRequestContextGetter* 299 net::URLRequestContextGetter*
294 OffTheRecordProfileImpl::GetRequestContextForExtensions() { 300 OffTheRecordProfileImpl::GetRequestContextForExtensions() {
295 return io_data_.GetExtensionsRequestContextGetter().get(); 301 return io_data_.GetExtensionsRequestContextGetter().get();
296 } 302 }
297 303
298 net::URLRequestContextGetter* 304 net::URLRequestContextGetter*
299 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( 305 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition(
300 const base::FilePath& partition_path, 306 const base::FilePath& partition_path,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 #if defined(OS_CHROMEOS) 485 #if defined(OS_CHROMEOS)
480 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 486 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
481 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 487 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
482 g_browser_process->local_state()); 488 g_browser_process->local_state());
483 } 489 }
484 #endif // defined(OS_CHROMEOS) 490 #endif // defined(OS_CHROMEOS)
485 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 491 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
486 GetPrefs(), g_browser_process->local_state()); 492 GetPrefs(), g_browser_process->local_state());
487 } 493 }
488 494
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698