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

Side by Side Diff: mojo/shell/capability_filter_unittest.cc

Issue 1318523007: Remove |requestor_url| from ApplicationManager::ConnectToApplication(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 // We expose Validator to the test application via ConnectToApplication 344 // We expose Validator to the test application via ConnectToApplication
345 // because we don't allow the test application to connect to test:validator. 345 // because we don't allow the test application to connect to test:validator.
346 // Adding it to the CapabilityFilter would interfere with the test. 346 // Adding it to the CapabilityFilter would interfere with the test.
347 ServiceProviderPtr exposed_services; 347 ServiceProviderPtr exposed_services;
348 (new ServiceProviderImpl(GetProxy(&exposed_services)))-> 348 (new ServiceProviderImpl(GetProxy(&exposed_services)))->
349 AddService<Validator>(validator_); 349 AddService<Validator>(validator_);
350 URLRequestPtr request(URLRequest::New()); 350 URLRequestPtr request(URLRequest::New());
351 request->url = String::From(url); 351 request->url = String::From(url);
352 application_manager_->ConnectToApplication( 352 application_manager_->ConnectToApplication(
353 nullptr, request.Pass(), std::string(), GURL(), GetProxy(&services), 353 nullptr, request.Pass(), std::string(), GetProxy(&services),
354 exposed_services.Pass(), filter, 354 exposed_services.Pass(), filter,
355 base::MessageLoop::QuitWhenIdleClosure(), EmptyConnectCallback()); 355 base::MessageLoop::QuitWhenIdleClosure(), EmptyConnectCallback());
356 } 356 }
357 357
358 void InitValidator(const std::set<std::string>& expectations) { 358 void InitValidator(const std::set<std::string>& expectations) {
359 validator_ = new ConnectionValidator(expectations, &loop_); 359 validator_ = new ConnectionValidator(expectations, &loop_);
360 application_manager()->SetLoaderForURL(make_scoped_ptr(validator_), 360 application_manager()->SetLoaderForURL(make_scoped_ptr(validator_),
361 GURL("test:validator")); 361 GURL("test:validator"));
362 } 362 }
363 363
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 RunTest(); 545 RunTest();
546 } 546 }
547 547
548 TEST_F(CapabilityFilter_WildcardsTest, ContentHandler) { 548 TEST_F(CapabilityFilter_WildcardsTest, ContentHandler) {
549 RunContentHandlerTest(); 549 RunContentHandlerTest();
550 } 550 }
551 551
552 } // namespace 552 } // namespace
553 } // namespace shell 553 } // namespace shell
554 } // namespace mojo 554 } // namespace mojo
OLDNEW
« mojo/shell/application_manager.h ('K') | « mojo/shell/application_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698