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

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_api_unittest.cc

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 5 #include <map>
6 #include <queue> 6 #include <queue>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 SentMessages::const_iterator sent_begin() const { 150 SentMessages::const_iterator sent_begin() const {
151 return sent_messages_.begin(); 151 return sent_messages_.begin();
152 } 152 }
153 153
154 SentMessages::const_iterator sent_end() const { 154 SentMessages::const_iterator sent_end() const {
155 return sent_messages_.end(); 155 return sent_messages_.end();
156 } 156 }
157 157
158 private: 158 private:
159 // IPC::Sender 159 // IPC::Sender
160 virtual bool Send(IPC::Message* message) OVERRIDE { 160 virtual bool Send(IPC::Message* message) override {
161 EXPECT_EQ(ExtensionMsg_MessageInvoke::ID, message->type()); 161 EXPECT_EQ(ExtensionMsg_MessageInvoke::ID, message->type());
162 162
163 EXPECT_FALSE(task_queue_.empty()); 163 EXPECT_FALSE(task_queue_.empty());
164 base::MessageLoop::current()->PostTask(FROM_HERE, task_queue_.front()); 164 base::MessageLoop::current()->PostTask(FROM_HERE, task_queue_.front());
165 task_queue_.pop(); 165 task_queue_.pop();
166 166
167 sent_messages_.push_back(linked_ptr<IPC::Message>(message)); 167 sent_messages_.push_back(linked_ptr<IPC::Message>(message));
168 return true; 168 return true;
169 } 169 }
170 170
171 std::queue<base::Closure> task_queue_; 171 std::queue<base::Closure> task_queue_;
172 SentMessages sent_messages_; 172 SentMessages sent_messages_;
173 }; 173 };
174 174
175 class ExtensionWebRequestTest : public testing::Test { 175 class ExtensionWebRequestTest : public testing::Test {
176 public: 176 public:
177 ExtensionWebRequestTest() 177 ExtensionWebRequestTest()
178 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), 178 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
179 profile_manager_(TestingBrowserProcess::GetGlobal()), 179 profile_manager_(TestingBrowserProcess::GetGlobal()),
180 event_router_(new EventRouterForwarder) {} 180 event_router_(new EventRouterForwarder) {}
181 181
182 protected: 182 protected:
183 virtual void SetUp() OVERRIDE { 183 virtual void SetUp() override {
184 ASSERT_TRUE(profile_manager_.SetUp()); 184 ASSERT_TRUE(profile_manager_.SetUp());
185 ChromeNetworkDelegate::InitializePrefsOnUIThread( 185 ChromeNetworkDelegate::InitializePrefsOnUIThread(
186 &enable_referrers_, NULL, NULL, profile_.GetTestingPrefService()); 186 &enable_referrers_, NULL, NULL, profile_.GetTestingPrefService());
187 network_delegate_.reset( 187 network_delegate_.reset(
188 new ChromeNetworkDelegate(event_router_.get(), &enable_referrers_)); 188 new ChromeNetworkDelegate(event_router_.get(), &enable_referrers_));
189 network_delegate_->set_profile(&profile_); 189 network_delegate_->set_profile(&profile_);
190 network_delegate_->set_cookie_settings( 190 network_delegate_->set_cookie_settings(
191 CookieSettings::Factory::GetForProfile(&profile_).get()); 191 CookieSettings::Factory::GetForProfile(&profile_).get());
192 context_.reset(new net::TestURLRequestContext(true)); 192 context_.reset(new net::TestURLRequestContext(true));
193 context_->set_network_delegate(network_delegate_.get()); 193 context_->set_network_delegate(network_delegate_.get());
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 EXPECT_TRUE(credentials_set); 2225 EXPECT_TRUE(credentials_set);
2226 EXPECT_FALSE(auth3.Empty()); 2226 EXPECT_FALSE(auth3.Empty());
2227 EXPECT_EQ(username, auth1.username()); 2227 EXPECT_EQ(username, auth1.username());
2228 EXPECT_EQ(password, auth1.password()); 2228 EXPECT_EQ(password, auth1.password());
2229 EXPECT_EQ(1u, warning_set.size()); 2229 EXPECT_EQ(1u, warning_set.size());
2230 EXPECT_TRUE(HasWarning(warning_set, "extid2")); 2230 EXPECT_TRUE(HasWarning(warning_set, "extid2"));
2231 EXPECT_EQ(3u, capturing_net_log.GetSize()); 2231 EXPECT_EQ(3u, capturing_net_log.GetSize());
2232 } 2232 }
2233 2233
2234 } // namespace extensions 2234 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698