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

Side by Side Diff: chrome/browser/sessions/chrome_serialized_navigation_driver.cc

Issue 2770913003: MD Settings: fix session restore when the MaterialDesignSettings feature changes across restarts (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/chrome_serialized_navigation_driver.h" 5 #include "chrome/browser/sessions/chrome_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 "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "components/sessions/core/serialized_navigation_entry.h" 10 #include "components/sessions/core/serialized_navigation_entry.h"
11 #include "content/public/common/referrer.h" 11 #include "content/public/common/referrer.h"
12 12
13 #if defined(OS_ANDROID) 13 #if defined(OS_ANDROID)
14 #include "content/public/common/content_features.h" 14 #include "content/public/common/content_features.h"
15 #include "content/public/common/page_state.h" 15 #include "content/public/common/page_state.h"
16 #endif 16 #endif
17 17
18 namespace { 18 namespace {
19 19
20 bool IsUberOrUberReplacementURL(const GURL& url) { 20 bool IsUberOrUberReplacementURL(const GURL& url) {
21 return url.SchemeIs(content::kChromeUIScheme) && 21 return url.SchemeIs(content::kChromeUIScheme) &&
22 (url.host_piece() == chrome::kChromeUIHistoryHost || 22 (url.host_piece() == chrome::kChromeUIHistoryHost ||
23 url.host_piece() == chrome::kChromeUIUberHost); 23 url.host_piece() == chrome::kChromeUIUberHost ||
24 url.host_piece() == chrome::kChromeUISettingsHost ||
25 url.host_piece() == chrome::kChromeUIHelpHost);
24 } 26 }
25 27
26 } // namespace 28 } // namespace
27 29
28 ChromeSerializedNavigationDriver::~ChromeSerializedNavigationDriver() {} 30 ChromeSerializedNavigationDriver::~ChromeSerializedNavigationDriver() {}
29 31
30 // static 32 // static
31 ChromeSerializedNavigationDriver* 33 ChromeSerializedNavigationDriver*
32 ChromeSerializedNavigationDriver::GetInstance() { 34 ChromeSerializedNavigationDriver::GetInstance() {
33 return base::Singleton< 35 return base::Singleton<
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // If the android native history UI has been disabled, redirect 96 // If the android native history UI has been disabled, redirect
95 // chrome-native://history to the old web UI. 97 // chrome-native://history to the old web UI.
96 navigation->set_virtual_url(GURL(chrome::kChromeUIHistoryURL)); 98 navigation->set_virtual_url(GURL(chrome::kChromeUIHistoryURL));
97 navigation->set_original_request_url(navigation->virtual_url()); 99 navigation->set_original_request_url(navigation->virtual_url());
98 navigation->set_encoded_page_state(std::string()); 100 navigation->set_encoded_page_state(std::string());
99 } 101 }
100 #endif // defined(OS_ANDROID) 102 #endif // defined(OS_ANDROID)
101 } 103 }
102 104
103 ChromeSerializedNavigationDriver::ChromeSerializedNavigationDriver() {} 105 ChromeSerializedNavigationDriver::ChromeSerializedNavigationDriver() {}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698