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

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: fix android build 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 int client_id,
652 const GURL& requesting_frame,
653 const MIDISysExPermissionCallback& callback) {
654 // Always reject requests for testing.
655 callback.Run(render_process_id, render_view_id, client_id, false);
656 }
657
648 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() { 658 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() {
649 if (!extensions_request_context_.get()) 659 if (!extensions_request_context_.get())
650 extensions_request_context_ = new TestExtensionURLRequestContextGetter(); 660 extensions_request_context_ = new TestExtensionURLRequestContextGetter();
651 return extensions_request_context_.get(); 661 return extensions_request_context_.get();
652 } 662 }
653 663
654 net::SSLConfigService* TestingProfile::GetSSLConfigService() { 664 net::SSLConfigService* TestingProfile::GetSSLConfigService() {
655 if (!GetRequestContext()) 665 if (!GetRequestContext())
656 return NULL; 666 return NULL;
657 return GetRequestContext()->GetURLRequestContext()->ssl_config_service(); 667 return GetRequestContext()->GetURLRequestContext()->ssl_config_service();
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 807
798 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { 808 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() {
799 DCHECK(!build_called_); 809 DCHECK(!build_called_);
800 build_called_ = true; 810 build_called_ = true;
801 return scoped_ptr<TestingProfile>(new TestingProfile( 811 return scoped_ptr<TestingProfile>(new TestingProfile(
802 path_, 812 path_,
803 delegate_, 813 delegate_,
804 extension_policy_, 814 extension_policy_,
805 pref_service_.Pass())); 815 pref_service_.Pass()));
806 } 816 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698