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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 18647002: Web MIDI: add RequestMIDISysExPermission to BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for commit Created 7 years, 5 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/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 return NULL; 638 return NULL;
639 } 639 }
640 640
641 net::URLRequestContextGetter* 641 net::URLRequestContextGetter*
642 TestingProfile::GetMediaRequestContextForStoragePartition( 642 TestingProfile::GetMediaRequestContextForStoragePartition(
643 const base::FilePath& partition_path, 643 const base::FilePath& partition_path,
644 bool in_memory) { 644 bool in_memory) {
645 return NULL; 645 return NULL;
646 } 646 }
647 647
648 void TestingProfile::RequestMIDISysExPermission(
649 int render_process_id,
650 int render_view_id,
651 const GURL& requesting_frame,
652 const MIDISysExPermissionCallback& callback) {
653 // Always reject requests for testing.
654 callback.Run(false);
655 }
656
648 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() { 657 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() {
649 if (!extensions_request_context_.get()) 658 if (!extensions_request_context_.get())
650 extensions_request_context_ = new TestExtensionURLRequestContextGetter(); 659 extensions_request_context_ = new TestExtensionURLRequestContextGetter();
651 return extensions_request_context_.get(); 660 return extensions_request_context_.get();
652 } 661 }
653 662
654 net::SSLConfigService* TestingProfile::GetSSLConfigService() { 663 net::SSLConfigService* TestingProfile::GetSSLConfigService() {
655 if (!GetRequestContext()) 664 if (!GetRequestContext())
656 return NULL; 665 return NULL;
657 return GetRequestContext()->GetURLRequestContext()->ssl_config_service(); 666 return GetRequestContext()->GetURLRequestContext()->ssl_config_service();
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 806
798 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { 807 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() {
799 DCHECK(!build_called_); 808 DCHECK(!build_called_);
800 build_called_ = true; 809 build_called_ = true;
801 return scoped_ptr<TestingProfile>(new TestingProfile( 810 return scoped_ptr<TestingProfile>(new TestingProfile(
802 path_, 811 path_,
803 delegate_, 812 delegate_,
804 extension_policy_, 813 extension_policy_,
805 pref_service_.Pass())); 814 pref_service_.Pass()));
806 } 815 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | content/browser/download/download_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698