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

Side by Side Diff: chrome/browser/history/history_backend.cc

Issue 511473002: Remove implicit conversions from scoped_refptr to T* in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move download out Created 6 years, 3 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 | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/history/history_service.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 (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 "chrome/browser/history/history_backend.h" 5 #include "chrome/browser/history/history_backend.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 scoped_refptr<HistoryBackend> history_backend_; 164 scoped_refptr<HistoryBackend> history_backend_;
165 }; 165 };
166 166
167 167
168 QueuedHistoryDBTask::QueuedHistoryDBTask( 168 QueuedHistoryDBTask::QueuedHistoryDBTask(
169 scoped_ptr<HistoryDBTask> task, 169 scoped_ptr<HistoryDBTask> task,
170 scoped_refptr<base::SingleThreadTaskRunner> origin_loop, 170 scoped_refptr<base::SingleThreadTaskRunner> origin_loop,
171 const base::CancelableTaskTracker::IsCanceledCallback& is_canceled) 171 const base::CancelableTaskTracker::IsCanceledCallback& is_canceled)
172 : task_(task.Pass()), origin_loop_(origin_loop), is_canceled_(is_canceled) { 172 : task_(task.Pass()), origin_loop_(origin_loop), is_canceled_(is_canceled) {
173 DCHECK(task_); 173 DCHECK(task_);
174 DCHECK(origin_loop_); 174 DCHECK(origin_loop_.get());
175 DCHECK(!is_canceled_.is_null()); 175 DCHECK(!is_canceled_.is_null());
176 } 176 }
177 177
178 QueuedHistoryDBTask::~QueuedHistoryDBTask() { 178 QueuedHistoryDBTask::~QueuedHistoryDBTask() {
179 // Ensure that |task_| is destroyed on its origin thread. 179 // Ensure that |task_| is destroyed on its origin thread.
180 origin_loop_->PostTask( 180 origin_loop_->PostTask(
181 FROM_HERE, 181 FROM_HERE,
182 base::Bind(&base::DeletePointer<HistoryDBTask>, 182 base::Bind(&base::DeletePointer<HistoryDBTask>,
183 base::Unretained(task_.release()))); 183 base::Unretained(task_.release())));
184 } 184 }
(...skipping 2568 matching lines...) Expand 10 before | Expand all | Expand 10 after
2753 int rank = kPageVisitStatsMaxTopSites; 2753 int rank = kPageVisitStatsMaxTopSites;
2754 std::map<GURL, int>::const_iterator it = most_visited_urls_map_.find(url); 2754 std::map<GURL, int>::const_iterator it = most_visited_urls_map_.find(url);
2755 if (it != most_visited_urls_map_.end()) 2755 if (it != most_visited_urls_map_.end())
2756 rank = (*it).second; 2756 rank = (*it).second;
2757 UMA_HISTOGRAM_ENUMERATION("History.TopSitesVisitsByRank", 2757 UMA_HISTOGRAM_ENUMERATION("History.TopSitesVisitsByRank",
2758 rank, kPageVisitStatsMaxTopSites + 1); 2758 rank, kPageVisitStatsMaxTopSites + 1);
2759 } 2759 }
2760 #endif 2760 #endif
2761 2761
2762 } // namespace history 2762 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698