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

Side by Side Diff: google_apis/gaia/account_tracker_unittest.cc

Issue 1873663002: Convert //google_apis from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "google_apis/gaia/account_tracker.h" 5 #include "google_apis/gaia/account_tracker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 340
341 private: 341 private:
342 FakeIdentityProvider* identity_provider() { 342 FakeIdentityProvider* identity_provider() {
343 return static_cast<FakeIdentityProvider*>( 343 return static_cast<FakeIdentityProvider*>(
344 account_tracker_->identity_provider()); 344 account_tracker_->identity_provider());
345 } 345 }
346 346
347 base::MessageLoopForIO message_loop_; // net:: stuff needs IO message loop. 347 base::MessageLoopForIO message_loop_; // net:: stuff needs IO message loop.
348 net::TestURLFetcherFactory test_fetcher_factory_; 348 net::TestURLFetcherFactory test_fetcher_factory_;
349 scoped_ptr<FakeOAuth2TokenService> fake_oauth2_token_service_; 349 std::unique_ptr<FakeOAuth2TokenService> fake_oauth2_token_service_;
350 scoped_ptr<FakeIdentityProvider> fake_identity_provider_; 350 std::unique_ptr<FakeIdentityProvider> fake_identity_provider_;
351 351
352 scoped_ptr<AccountTracker> account_tracker_; 352 std::unique_ptr<AccountTracker> account_tracker_;
353 AccountTrackerObserver observer_; 353 AccountTrackerObserver observer_;
354 }; 354 };
355 355
356 void IdentityAccountTrackerTest::ReturnOAuthUrlFetchResults( 356 void IdentityAccountTrackerTest::ReturnOAuthUrlFetchResults(
357 int fetcher_id, 357 int fetcher_id,
358 net::HttpStatusCode response_code, 358 net::HttpStatusCode response_code,
359 const std::string& response_string) { 359 const std::string& response_string) {
360 360
361 net::TestURLFetcher* fetcher = 361 net::TestURLFetcher* fetcher =
362 test_fetcher_factory_.GetFetcherByID(fetcher_id); 362 test_fetcher_factory_.GetFetcherByID(fetcher_id);
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 EXPECT_TRUE(ids.email.empty()); 806 EXPECT_TRUE(ids.email.empty());
807 EXPECT_TRUE(ids.gaia.empty()); 807 EXPECT_TRUE(ids.gaia.empty());
808 808
809 ids = account_tracker()->FindAccountIdsByGaiaId("alpha@example.com"); 809 ids = account_tracker()->FindAccountIdsByGaiaId("alpha@example.com");
810 EXPECT_TRUE(ids.account_key.empty()); 810 EXPECT_TRUE(ids.account_key.empty());
811 EXPECT_TRUE(ids.email.empty()); 811 EXPECT_TRUE(ids.email.empty());
812 EXPECT_TRUE(ids.gaia.empty()); 812 EXPECT_TRUE(ids.gaia.empty());
813 } 813 }
814 814
815 } // namespace gaia 815 } // namespace gaia
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698