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

Side by Side Diff: chrome/browser/thumbnails/thumbnail_service_impl.cc

Issue 1095183004: [chrome/browser/t*] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding files 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 (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/thumbnails/thumbnail_service_impl.h" 5 #include "chrome/browser/thumbnails/thumbnail_service_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "chrome/browser/history/history_utils.h" 10 #include "chrome/browser/history/history_utils.h"
(...skipping 18 matching lines...) Expand all
29 bool IsThumbnailRetargetingEnabled() { 29 bool IsThumbnailRetargetingEnabled() {
30 if (!chrome::IsInstantExtendedAPIEnabled()) 30 if (!chrome::IsInstantExtendedAPIEnabled())
31 return false; 31 return false;
32 32
33 return base::CommandLine::ForCurrentProcess()->HasSwitch( 33 return base::CommandLine::ForCurrentProcess()->HasSwitch(
34 switches::kEnableThumbnailRetargeting); 34 switches::kEnableThumbnailRetargeting);
35 } 35 }
36 36
37 void AddForcedURLOnUIThread(scoped_refptr<history::TopSites> top_sites, 37 void AddForcedURLOnUIThread(scoped_refptr<history::TopSites> top_sites,
38 const GURL& url) { 38 const GURL& url) {
39 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 39 DCHECK_CURRENTLY_ON(BrowserThread::UI);
40 40
41 if (top_sites) 41 if (top_sites)
42 top_sites->AddForcedURL(url, base::Time::Now()); 42 top_sites->AddForcedURL(url, base::Time::Now());
43 } 43 }
44 44
45 } // namespace 45 } // namespace
46 46
47 namespace thumbnails { 47 namespace thumbnails {
48 48
49 ThumbnailServiceImpl::ThumbnailServiceImpl(Profile* profile) 49 ThumbnailServiceImpl::ThumbnailServiceImpl(Profile* profile)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 void ThumbnailServiceImpl::ShutdownOnUIThread() { 122 void ThumbnailServiceImpl::ShutdownOnUIThread() {
123 // Since each call uses its own scoped_refptr, we can just clear the reference 123 // Since each call uses its own scoped_refptr, we can just clear the reference
124 // here by assigning null. If another call is completed, it added its own 124 // here by assigning null. If another call is completed, it added its own
125 // reference. 125 // reference.
126 top_sites_ = NULL; 126 top_sites_ = NULL;
127 } 127 }
128 128
129 } // namespace thumbnails 129 } // namespace thumbnails
OLDNEW
« no previous file with comments | « chrome/browser/thumbnails/simple_thumbnail_crop.cc ('k') | chrome/browser/thumbnails/thumbnail_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698