Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / sessions / base_session_service_delegate_impl.cc
blobcd584bf87ae77f64a89e5f72ab282787229a63cb
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
3 // found in the LICENSE file.
5 #include "chrome/browser/sessions/base_session_service_delegate_impl.h"
7 #include "chrome/common/url_constants.h"
8 #include "content/public/browser/browser_thread.h"
9 #include "url/gurl.h"
11 BaseSessionServiceDelegateImpl::BaseSessionServiceDelegateImpl(
12 bool should_use_delayed_save)
13 : should_use_delayed_save_(should_use_delayed_save) {}
15 base::SequencedWorkerPool* BaseSessionServiceDelegateImpl::GetBlockingPool() {
16 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
17 return content::BrowserThread::GetBlockingPool();
20 bool BaseSessionServiceDelegateImpl::ShouldTrackEntry(const GURL& url) {
21 // Blacklist chrome://quit and chrome://restart to avoid quit or restart
22 // loops.
23 return url.is_valid() &&
24 !(url.SchemeIs(content::kChromeUIScheme) &&
25 (url.host() == chrome::kChromeUIQuitHost ||
26 url.host() == chrome::kChromeUIRestartHost));
29 bool BaseSessionServiceDelegateImpl::ShouldUseDelayedSave() {
30 return should_use_delayed_save_;