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

Side by Side Diff: components/sessions/content/content_serialized_navigation_driver.cc

Issue 2743323005: MD Settings: enhance restarting Chrome + interacting w/ session restore (Closed)
Patch Set: merge Created 3 years, 9 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 "components/sessions/content/content_serialized_navigation_driver.h" 5 #include "components/sessions/content/content_serialized_navigation_driver.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "components/sessions/core/serialized_navigation_entry.h" 9 #include "components/sessions/core/serialized_navigation_entry.h"
10 #include "content/public/common/content_features.h" 10 #include "content/public/common/content_features.h"
11 #include "content/public/common/page_state.h" 11 #include "content/public/common/page_state.h"
12 #include "content/public/common/referrer.h" 12 #include "content/public/common/referrer.h"
13 #include "content/public/common/url_constants.h" 13 #include "content/public/common/url_constants.h"
14 14
15 namespace sessions { 15 namespace sessions {
16 16
17 namespace { 17 namespace {
18 const int kObsoleteReferrerPolicyAlways = 0; 18 const int kObsoleteReferrerPolicyAlways = 0;
19 const int kObsoleteReferrerPolicyDefault = 1; 19 const int kObsoleteReferrerPolicyDefault = 1;
20 const int kObsoleteReferrerPolicyNever = 2; 20 const int kObsoleteReferrerPolicyNever = 2;
21 const int kObsoleteReferrerPolicyOrigin = 3; 21 const int kObsoleteReferrerPolicyOrigin = 3;
22 22
23 bool IsUberOrUberReplacementURL(const GURL& url) { 23 bool IsUberOrUberReplacementURL(const GURL& url) {
24 return url.SchemeIs(content::kChromeUIScheme) && 24 return url.SchemeIs(content::kChromeUIScheme) &&
25 (url.host_piece() == content::kChromeUIHistoryHost || 25 (url.host_piece() == content::kChromeUIHelpHost ||
26 url.host_piece() == content::kChromeUIHistoryHost ||
27 url.host_piece() == content::kChromeUISettingsHost ||
26 url.host_piece() == content::kChromeUIUberHost); 28 url.host_piece() == content::kChromeUIUberHost);
27 } 29 }
28 30
29 } // namespace 31 } // namespace
30 32
31 // static 33 // static
32 SerializedNavigationDriver* SerializedNavigationDriver::Get() { 34 SerializedNavigationDriver* SerializedNavigationDriver::Get() {
33 return ContentSerializedNavigationDriver::GetInstance(); 35 return ContentSerializedNavigationDriver::GetInstance();
34 } 36 }
35 37
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 DCHECK(handler.get()); 180 DCHECK(handler.get());
179 extended_info_handler_map_[key] = std::move(handler); 181 extended_info_handler_map_[key] = std::move(handler);
180 } 182 }
181 183
182 const ContentSerializedNavigationDriver::ExtendedInfoHandlerMap& 184 const ContentSerializedNavigationDriver::ExtendedInfoHandlerMap&
183 ContentSerializedNavigationDriver::GetAllExtendedInfoHandlers() const { 185 ContentSerializedNavigationDriver::GetAllExtendedInfoHandlers() const {
184 return extended_info_handler_map_; 186 return extended_info_handler_map_;
185 } 187 }
186 188
187 } // namespace sessions 189 } // namespace sessions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698