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

Side by Side Diff: chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate_unittest.cc

Issue 2257113002: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <deque> 5 #include <deque>
6 #include <memory> 6 #include <memory>
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 private: 59 private:
60 std::set<Entry> fake_registry_; 60 std::set<Entry> fake_registry_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(TestEventRouter); 62 DISALLOW_COPY_AND_ASSIGN(TestEventRouter);
63 }; 63 };
64 64
65 std::unique_ptr<KeyedService> TestEventRouterFactoryFunction( 65 std::unique_ptr<KeyedService> TestEventRouterFactoryFunction(
66 content::BrowserContext* context) { 66 content::BrowserContext* context) {
67 return base::WrapUnique(new TestEventRouter(context)); 67 return base::MakeUnique<TestEventRouter>(context);
68 } 68 }
69 69
70 // This class lets us intercept extension update checks and respond as if 70 // This class lets us intercept extension update checks and respond as if
71 // either no update was found, or one was (and it was downloaded). 71 // either no update was found, or one was (and it was downloaded).
72 class DownloaderTestDelegate : public ExtensionDownloaderTestDelegate { 72 class DownloaderTestDelegate : public ExtensionDownloaderTestDelegate {
73 public: 73 public:
74 DownloaderTestDelegate() {} 74 DownloaderTestDelegate() {}
75 75
76 // On the next update check for extension |id|, we'll respond that no update 76 // On the next update check for extension |id|, we'll respond that no update
77 // is available. 77 // is available.
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 // Call again after a longer delay, we should should be unthrottled. 312 // Call again after a longer delay, we should should be unthrottled.
313 clock_.Advance(base::TimeDelta::FromHours(8)); 313 clock_.Advance(base::TimeDelta::FromHours(8));
314 downloader_test_delegate_.AddNoUpdateResponse(id); 314 downloader_test_delegate_.AddNoUpdateResponse(id);
315 DoUpdateCheck(id, "no_update", ""); 315 DoUpdateCheck(id, "no_update", "");
316 } 316 }
317 317
318 } // namespace 318 } // namespace
319 319
320 } // namespace extensions 320 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698