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

Side by Side Diff: components/sync_sessions/favicon_cache_unittest.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 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 "components/sync_sessions/favicon_cache.h" 5 #include "components/sync_sessions/favicon_cache.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } 396 }
397 } 397 }
398 if (!found_match) 398 if (!found_match)
399 return testing::AssertionFailure() << "Could not find favicon."; 399 return testing::AssertionFailure() << "Could not find favicon.";
400 } 400 }
401 return testing::AssertionSuccess(); 401 return testing::AssertionSuccess();
402 } 402 }
403 403
404 std::unique_ptr<syncer::SyncChangeProcessor> 404 std::unique_ptr<syncer::SyncChangeProcessor>
405 SyncFaviconCacheTest::CreateAndPassProcessor() { 405 SyncFaviconCacheTest::CreateAndPassProcessor() {
406 return base::WrapUnique( 406 return base::MakeUnique<syncer::SyncChangeProcessorWrapperForTest>(
407 new syncer::SyncChangeProcessorWrapperForTest(sync_processor_.get())); 407 sync_processor_.get());
408 } 408 }
409 409
410 std::unique_ptr<syncer::SyncErrorFactory> 410 std::unique_ptr<syncer::SyncErrorFactory>
411 SyncFaviconCacheTest::CreateAndPassSyncErrorFactory() { 411 SyncFaviconCacheTest::CreateAndPassSyncErrorFactory() {
412 return base::WrapUnique(new syncer::SyncErrorFactoryMock); 412 return base::WrapUnique(new syncer::SyncErrorFactoryMock);
413 } 413 }
414 414
415 void SyncFaviconCacheTest::OnCustomFaviconDataAvailable( 415 void SyncFaviconCacheTest::OnCustomFaviconDataAvailable(
416 const TestFaviconData& test_data) { 416 const TestFaviconData& test_data) {
417 std::vector<favicon_base::FaviconRawBitmapResult> bitmap_results; 417 std::vector<favicon_base::FaviconRawBitmapResult> bitmap_results;
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 EXPECT_EQ(changes[4].change_type(), syncer::SyncChange::ACTION_ADD); 1929 EXPECT_EQ(changes[4].change_type(), syncer::SyncChange::ACTION_ADD);
1930 EXPECT_EQ(changes[4].sync_data().GetDataType(), syncer::FAVICON_TRACKING); 1930 EXPECT_EQ(changes[4].sync_data().GetDataType(), syncer::FAVICON_TRACKING);
1931 EXPECT_EQ(kMaxSyncFavicons, GetFaviconId(changes[4])); 1931 EXPECT_EQ(kMaxSyncFavicons, GetFaviconId(changes[4]));
1932 // Expire tracking for favicon[0]. 1932 // Expire tracking for favicon[0].
1933 EXPECT_EQ(changes[5].change_type(), syncer::SyncChange::ACTION_DELETE); 1933 EXPECT_EQ(changes[5].change_type(), syncer::SyncChange::ACTION_DELETE);
1934 EXPECT_EQ(changes[5].sync_data().GetDataType(), syncer::FAVICON_TRACKING); 1934 EXPECT_EQ(changes[5].sync_data().GetDataType(), syncer::FAVICON_TRACKING);
1935 EXPECT_EQ(0, GetFaviconId(changes[5])); 1935 EXPECT_EQ(0, GetFaviconId(changes[5]));
1936 } 1936 }
1937 1937
1938 } // namespace browser_sync 1938 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698