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

Side by Side Diff: components/search_provider_logos/logo_tracker_unittest.cc

Issue 1056633004: Update {virtual,override} to follow C++11 style in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix logo tracker unittest. Created 5 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 "components/search_provider_logos/logo_tracker.h" 5 #include "components/search_provider_logos/logo_tracker.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 virtual const LogoMetadata* GetCachedLogoMetadataInternal() { 231 virtual const LogoMetadata* GetCachedLogoMetadataInternal() {
232 return metadata_.get(); 232 return metadata_.get();
233 } 233 }
234 234
235 virtual void SetCachedLogoInternal(const EncodedLogo* logo) { 235 virtual void SetCachedLogoInternal(const EncodedLogo* logo) {
236 logo_.reset(logo ? new EncodedLogo(*logo) : NULL); 236 logo_.reset(logo ? new EncodedLogo(*logo) : NULL);
237 metadata_.reset(logo ? new LogoMetadata(logo->metadata) : NULL); 237 metadata_.reset(logo ? new LogoMetadata(logo->metadata) : NULL);
238 } 238 }
239 239
240 virtual scoped_ptr<EncodedLogo> GetCachedLogo() override { 240 scoped_ptr<EncodedLogo> GetCachedLogo() override {
241 OnGetCachedLogo(); 241 OnGetCachedLogo();
242 return make_scoped_ptr(logo_ ? new EncodedLogo(*logo_) : NULL); 242 return make_scoped_ptr(logo_ ? new EncodedLogo(*logo_) : NULL);
243 } 243 }
244 244
245 private: 245 private:
246 scoped_ptr<LogoMetadata> metadata_; 246 scoped_ptr<LogoMetadata> metadata_;
247 scoped_ptr<EncodedLogo> logo_; 247 scoped_ptr<EncodedLogo> logo_;
248 }; 248 };
249 249
250 class MockLogoObserver : public LogoObserver { 250 class MockLogoObserver : public LogoObserver {
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 MockLogoObserver listener2; 733 MockLogoObserver listener2;
734 listener2.ExpectFreshLogo(&logo); 734 listener2.ExpectFreshLogo(&logo);
735 logo_tracker_->GetLogo(&listener2); 735 logo_tracker_->GetLogo(&listener2);
736 736
737 base::RunLoop().RunUntilIdle(); 737 base::RunLoop().RunUntilIdle();
738 } 738 }
739 739
740 } // namespace 740 } // namespace
741 741
742 } // namespace search_provider_logos 742 } // namespace search_provider_logos
OLDNEW
« no previous file with comments | « components/renderer_context_menu/render_view_context_menu_observer.h ('k') | components/storage_monitor/storage_monitor_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698