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

Side by Side Diff: extensions/browser/quota_service_unittest.cc

Issue 1909773002: Convert //extensions/browser 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
« no previous file with comments | « extensions/browser/quota_service.h ('k') | extensions/browser/sandboxed_unpacker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void SetUp() override { service_.reset(new QuotaService()); } 114 void SetUp() override { service_.reset(new QuotaService()); }
115 void TearDown() override { 115 void TearDown() override {
116 loop_.RunUntilIdle(); 116 loop_.RunUntilIdle();
117 service_.reset(); 117 service_.reset();
118 } 118 }
119 119
120 protected: 120 protected:
121 std::string extension_a_; 121 std::string extension_a_;
122 std::string extension_b_; 122 std::string extension_b_;
123 std::string extension_c_; 123 std::string extension_c_;
124 scoped_ptr<QuotaService> service_; 124 std::unique_ptr<QuotaService> service_;
125 base::MessageLoop loop_; 125 base::MessageLoop loop_;
126 content::TestBrowserThread ui_thread_; 126 content::TestBrowserThread ui_thread_;
127 }; 127 };
128 128
129 class QuotaLimitHeuristicTest : public testing::Test { 129 class QuotaLimitHeuristicTest : public testing::Test {
130 public: 130 public:
131 static void DoMoreThan2PerMinuteFor5Minutes(const TimeTicks& start_time, 131 static void DoMoreThan2PerMinuteFor5Minutes(const TimeTicks& start_time,
132 QuotaLimitHeuristic* lim, 132 QuotaLimitHeuristic* lim,
133 Bucket* b, 133 Bucket* b,
134 int an_unexhausted_minute) { 134 int an_unexhausted_minute) {
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 EXPECT_NE("", service_->Assess(extension_a_, f.get(), &arg, 325 EXPECT_NE("", service_->Assess(extension_a_, f.get(), &arg,
326 kStartTime + TimeDelta::FromDays(1) + 326 kStartTime + TimeDelta::FromDays(1) +
327 TimeDelta::FromSeconds(25))); 327 TimeDelta::FromSeconds(25)));
328 328
329 // Like now. 329 // Like now.
330 EXPECT_EQ("", service_->Assess(extension_a_, f.get(), &arg, 330 EXPECT_EQ("", service_->Assess(extension_a_, f.get(), &arg,
331 kStartTime + TimeDelta::FromDays(2))); 331 kStartTime + TimeDelta::FromDays(2)));
332 } 332 }
333 333
334 } // namespace extensions 334 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/quota_service.h ('k') | extensions/browser/sandboxed_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698