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

Side by Side Diff: components/bookmarks/test/bookmark_test_helpers.cc

Issue 666133002: Standardize usage of virtual/override/final in components/ (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 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/bookmarks/test/bookmark_test_helpers.h" 5 #include "components/bookmarks/test/bookmark_test_helpers.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "components/bookmarks/browser/base_bookmark_model_observer.h" 13 #include "components/bookmarks/browser/base_bookmark_model_observer.h"
14 #include "components/bookmarks/browser/bookmark_model.h" 14 #include "components/bookmarks/browser/bookmark_model.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace { 17 namespace {
18 18
19 // BookmarkLoadObserver is used when blocking until the BookmarkModel finishes 19 // BookmarkLoadObserver is used when blocking until the BookmarkModel finishes
20 // loading. As soon as the BookmarkModel finishes loading the message loop is 20 // loading. As soon as the BookmarkModel finishes loading the message loop is
21 // quit. 21 // quit.
22 class BookmarkLoadObserver : public BaseBookmarkModelObserver { 22 class BookmarkLoadObserver : public BaseBookmarkModelObserver {
23 public: 23 public:
24 explicit BookmarkLoadObserver(const base::Closure& quit_task); 24 explicit BookmarkLoadObserver(const base::Closure& quit_task);
25 virtual ~BookmarkLoadObserver(); 25 ~BookmarkLoadObserver() override;
26 26
27 private: 27 private:
28 // BaseBookmarkModelObserver: 28 // BaseBookmarkModelObserver:
29 virtual void BookmarkModelChanged() override; 29 void BookmarkModelChanged() override;
30 virtual void BookmarkModelLoaded(BookmarkModel* model, 30 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override;
31 bool ids_reassigned) override;
32 31
33 base::Closure quit_task_; 32 base::Closure quit_task_;
34 33
35 DISALLOW_COPY_AND_ASSIGN(BookmarkLoadObserver); 34 DISALLOW_COPY_AND_ASSIGN(BookmarkLoadObserver);
36 }; 35 };
37 36
38 BookmarkLoadObserver::BookmarkLoadObserver(const base::Closure& quit_task) 37 BookmarkLoadObserver::BookmarkLoadObserver(const base::Closure& quit_task)
39 : quit_task_(quit_task) {} 38 : quit_task_(quit_task) {}
40 39
41 BookmarkLoadObserver::~BookmarkLoadObserver() {} 40 BookmarkLoadObserver::~BookmarkLoadObserver() {}
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 const BookmarkNode* node, 129 const BookmarkNode* node,
131 const std::string& model_string) { 130 const std::string& model_string) {
132 DCHECK(node); 131 DCHECK(node);
133 std::string::size_type start_pos = 0; 132 std::string::size_type start_pos = 0;
134 std::string::size_type end_pos = 133 std::string::size_type end_pos =
135 AddNodesFromString(model, node, model_string, start_pos); 134 AddNodesFromString(model, node, model_string, start_pos);
136 DCHECK(end_pos == std::string::npos); 135 DCHECK(end_pos == std::string::npos);
137 } 136 }
138 137
139 } // namespace test 138 } // namespace test
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_utils_unittest.cc ('k') | components/bookmarks/test/test_bookmark_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698