blob: 5f016e0dc533692e1d6180d592bb64d9830f9868 [file] [log] [blame]
georgesaka3ae61c72015-04-02 01:04:261// Copyright 2015 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.
4
5#include "chrome/browser/sessions/session_restore_delegate.h"
6
georgesakfbcd45d2015-04-07 15:08:247#include "base/metrics/field_trial.h"
georgesak98702bbb2015-04-03 17:59:228#include "chrome/browser/sessions/session_restore_stats_collector.h"
georgesaka3ae61c72015-04-02 01:04:269#include "chrome/browser/sessions/tab_loader.h"
georgesak189ed372015-05-08 03:53:3010#include "chrome/common/url_constants.h"
georgesakbf4674a2015-04-13 18:50:3111#include "components/favicon/content/content_favicon_driver.h"
georgesaka3ae61c72015-04-02 01:04:2612
georgesak189ed372015-05-08 03:53:3013namespace {
14
15bool IsInternalPage(const GURL& url) {
16 // There are many chrome:// UI URLs, but only look for the ones that users
17 // are likely to have open. Most of the benefit is from the NTP URL.
18 const char* const kReloadableUrlPrefixes[] = {
19 chrome::kChromeUIDownloadsURL,
20 chrome::kChromeUIHistoryURL,
21 chrome::kChromeUINewTabURL,
22 chrome::kChromeUISettingsURL,
23 };
24 // Prefix-match against the table above. Use strncmp to avoid allocating
25 // memory to convert the URL prefix constants into std::strings.