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: chrome/browser/sessions/base_session_service_delegate_impl.cc

Issue 1106593002: [chrome/browser/se*-ss*] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 "chrome/browser/sessions/base_session_service_delegate_impl.h" 5 #include "chrome/browser/sessions/base_session_service_delegate_impl.h"
6 6
7 #include "chrome/common/url_constants.h" 7 #include "chrome/common/url_constants.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
11 BaseSessionServiceDelegateImpl::BaseSessionServiceDelegateImpl( 11 BaseSessionServiceDelegateImpl::BaseSessionServiceDelegateImpl(
12 bool should_use_delayed_save) 12 bool should_use_delayed_save)
13 : should_use_delayed_save_(should_use_delayed_save) {} 13 : should_use_delayed_save_(should_use_delayed_save) {}
14 14
15 base::SequencedWorkerPool* BaseSessionServiceDelegateImpl::GetBlockingPool() { 15 base::SequencedWorkerPool* BaseSessionServiceDelegateImpl::GetBlockingPool() {
16 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 16 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
17 return content::BrowserThread::GetBlockingPool(); 17 return content::BrowserThread::GetBlockingPool();
18 } 18 }
19 19
20 bool BaseSessionServiceDelegateImpl::ShouldTrackEntry(const GURL& url) { 20 bool BaseSessionServiceDelegateImpl::ShouldTrackEntry(const GURL& url) {
21 // Blacklist chrome://quit and chrome://restart to avoid quit or restart 21 // Blacklist chrome://quit and chrome://restart to avoid quit or restart
22 // loops. 22 // loops.
23 return url.is_valid() && 23 return url.is_valid() &&
24 !(url.SchemeIs(content::kChromeUIScheme) && 24 !(url.SchemeIs(content::kChromeUIScheme) &&
25 (url.host() == chrome::kChromeUIQuitHost || 25 (url.host() == chrome::kChromeUIQuitHost ||
26 url.host() == chrome::kChromeUIRestartHost)); 26 url.host() == chrome::kChromeUIRestartHost));
27 } 27 }
28 28
29 bool BaseSessionServiceDelegateImpl::ShouldUseDelayedSave() { 29 bool BaseSessionServiceDelegateImpl::ShouldUseDelayedSave() {
30 return should_use_delayed_save_; 30 return should_use_delayed_save_;
31 } 31 }
OLDNEW
« no previous file with comments | « chrome/browser/service_process/service_process_control.cc ('k') | chrome/browser/sessions/session_data_deleter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698