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

Side by Side Diff: components/sync_sessions/revisit/bookmarks_page_revisit_observer.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/sync_sessions/revisit/bookmarks_page_revisit_observer.h" 5 #include "components/sync_sessions/revisit/bookmarks_page_revisit_observer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility>
8 9
9 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
10 #include "base/time/time.h" 11 #include "base/time/time.h"
11 #include "components/bookmarks/browser/bookmark_model.h" 12 #include "components/bookmarks/browser/bookmark_model.h"
12 #include "components/bookmarks/browser/bookmark_node.h" 13 #include "components/bookmarks/browser/bookmark_node.h"
13 #include "url/gurl.h" 14 #include "url/gurl.h"
14 15
15 namespace sync_sessions { 16 namespace sync_sessions {
16 17
17 BookmarksPageRevisitObserver::BookmarksPageRevisitObserver( 18 BookmarksPageRevisitObserver::BookmarksPageRevisitObserver(
18 scoped_ptr<BookmarksByUrlProvider> provider) 19 scoped_ptr<BookmarksByUrlProvider> provider)
19 : provider_(provider.Pass()) {} 20 : provider_(std::move(provider)) {}
20 21
21 BookmarksPageRevisitObserver::~BookmarksPageRevisitObserver() {} 22 BookmarksPageRevisitObserver::~BookmarksPageRevisitObserver() {}
22 23
23 void BookmarksPageRevisitObserver::OnPageVisit( 24 void BookmarksPageRevisitObserver::OnPageVisit(
24 const GURL& url, 25 const GURL& url,
25 const TransitionType transition) { 26 const TransitionType transition) {
26 base::TimeTicks start(base::TimeTicks::Now()); 27 base::TimeTicks start(base::TimeTicks::Now());
27 28
28 std::vector<const bookmarks::BookmarkNode*> nodes; 29 std::vector<const bookmarks::BookmarkNode*> nodes;
29 provider_->GetNodesByURL(url, &nodes); 30 provider_->GetNodesByURL(url, &nodes);
(...skipping 12 matching lines...) Expand all
42 UMA_HISTOGRAM_ENUMERATION("Sync.PageRevisitBookmarksMatchTransition", 43 UMA_HISTOGRAM_ENUMERATION("Sync.PageRevisitBookmarksMatchTransition",
43 transition, 44 transition,
44 PageVisitObserver::kTransitionTypeLast); 45 PageVisitObserver::kTransitionTypeLast);
45 } 46 }
46 47
47 base::TimeDelta duration(base::TimeTicks::Now() - start); 48 base::TimeDelta duration(base::TimeTicks::Now() - start);
48 UMA_HISTOGRAM_TIMES("Sync.PageRevisitBookmarksDuration", duration); 49 UMA_HISTOGRAM_TIMES("Sync.PageRevisitBookmarksDuration", duration);
49 } 50 }
50 51
51 } // namespace sync_sessions 52 } // namespace sync_sessions
OLDNEW
« no previous file with comments | « components/sync_sessions/favicon_cache.cc ('k') | components/sync_sessions/revisit/sessions_page_revisit_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698