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

Side by Side Diff: chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <memory>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/command_line.h" 11 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
11 #include "base/location.h" 13 #include "base/location.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
15 #include "build/build_config.h" 16 #include "build/build_config.h"
16 #include "chrome/browser/local_discovery/test_service_discovery_client.h" 17 #include "chrome/browser/local_discovery/test_service_discovery_client.h"
17 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 19 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
19 #include "chrome/browser/signin/signin_manager_factory.h" 20 #include "chrome/browser/signin/signin_manager_factory.h"
20 #include "chrome/browser/ui/browser.h" 21 #include "chrome/browser/ui/browser.h"
21 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" 22 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h"
22 #include "chrome/common/chrome_constants.h" 23 #include "chrome/common/chrome_constants.h"
23 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 class MockableFakeURLFetcherCreator { 319 class MockableFakeURLFetcherCreator {
319 public: 320 public:
320 MockableFakeURLFetcherCreator() { 321 MockableFakeURLFetcherCreator() {
321 } 322 }
322 323
323 ~MockableFakeURLFetcherCreator() { 324 ~MockableFakeURLFetcherCreator() {
324 } 325 }
325 326
326 MOCK_METHOD1(OnCreateFakeURLFetcher, void(const std::string& url)); 327 MOCK_METHOD1(OnCreateFakeURLFetcher, void(const std::string& url));
327 328
328 scoped_ptr<net::FakeURLFetcher> CreateFakeURLFetcher( 329 std::unique_ptr<net::FakeURLFetcher> CreateFakeURLFetcher(
329 const GURL& url, 330 const GURL& url,
330 net::URLFetcherDelegate* delegate, 331 net::URLFetcherDelegate* delegate,
331 const std::string& response_data, 332 const std::string& response_data,
332 net::HttpStatusCode response_code, 333 net::HttpStatusCode response_code,
333 net::URLRequestStatus::Status status) { 334 net::URLRequestStatus::Status status) {
334 OnCreateFakeURLFetcher(url.spec()); 335 OnCreateFakeURLFetcher(url.spec());
335 return scoped_ptr<net::FakeURLFetcher>(new net::FakeURLFetcher( 336 return std::unique_ptr<net::FakeURLFetcher>(new net::FakeURLFetcher(
336 url, delegate, response_data, response_code, status)); 337 url, delegate, response_data, response_code, status));
337 } 338 }
338 339
339 net::FakeURLFetcherFactory::FakeURLFetcherCreator callback() { 340 net::FakeURLFetcherFactory::FakeURLFetcherCreator callback() {
340 return base::Bind(&MockableFakeURLFetcherCreator::CreateFakeURLFetcher, 341 return base::Bind(&MockableFakeURLFetcherCreator::CreateFakeURLFetcher,
341 base::Unretained(this)); 342 base::Unretained(this));
342 } 343 }
343 }; 344 };
344 345
345 class LocalDiscoveryUITest : public WebUIBrowserTest { 346 class LocalDiscoveryUITest : public WebUIBrowserTest {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 kAnnouncePacketRegistered, sizeof(kAnnouncePacketRegistered)); 577 kAnnouncePacketRegistered, sizeof(kAnnouncePacketRegistered));
577 578
578 base::MessageLoop::current()->RunUntilIdle(); 579 base::MessageLoop::current()->RunUntilIdle();
579 580
580 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("expectRegisterDone")); 581 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("expectRegisterDone"));
581 } 582 }
582 583
583 } // namespace 584 } // namespace
584 585
585 } // namespace local_discovery 586 } // namespace local_discovery
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/large_icon_source.h ('k') | chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698