OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/browser_command_controller.h" | 5 #include "chrome/browser/ui/browser_command_controller.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/defaults.h" | 10 #include "chrome/browser/defaults.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 if (!entry) | 64 if (!entry) |
65 return false; | 65 return false; |
66 | 66 |
67 // Check the |virtual_url()| first. This catches regular chrome:// URLs | 67 // Check the |virtual_url()| first. This catches regular chrome:// URLs |
68 // including URLs that were rewritten (such as chrome://bookmarks). | 68 // including URLs that were rewritten (such as chrome://bookmarks). |
69 if (entry->GetVirtualURL().SchemeIs(chrome::kChromeUIScheme)) | 69 if (entry->GetVirtualURL().SchemeIs(chrome::kChromeUIScheme)) |
70 return true; | 70 return true; |
71 | 71 |
72 // If the |virtual_url()| isn't a chrome:// URL, check if it's actually | 72 // If the |virtual_url()| isn't a chrome:// URL, check if it's actually |
73 // view-source: of a chrome:// URL. | 73 // view-source: of a chrome:// URL. |
74 if (entry->GetVirtualURL().SchemeIs(chrome::kViewSourceScheme)) | 74 if (entry->GetVirtualURL().SchemeIs(content::kViewSourceScheme)) |
75 return entry->GetURL().SchemeIs(chrome::kChromeUIScheme); | 75 return entry->GetURL().SchemeIs(chrome::kChromeUIScheme); |
76 | 76 |
77 return false; | 77 return false; |
78 } | 78 } |
79 | 79 |
80 #if defined(OS_WIN) | 80 #if defined(OS_WIN) |
81 // Windows 8 specific helper class to manage DefaultBrowserWorker. It does the | 81 // Windows 8 specific helper class to manage DefaultBrowserWorker. It does the |
82 // following asynchronous actions in order: | 82 // following asynchronous actions in order: |
83 // 1- Check that chrome is the default browser | 83 // 1- Check that chrome is the default browser |
84 // 2- If we are the default, restart chrome in metro and exit | 84 // 2- If we are the default, restart chrome in metro and exit |
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 | 1260 |
1261 BrowserWindow* BrowserCommandController::window() { | 1261 BrowserWindow* BrowserCommandController::window() { |
1262 return browser_->window(); | 1262 return browser_->window(); |
1263 } | 1263 } |
1264 | 1264 |
1265 Profile* BrowserCommandController::profile() { | 1265 Profile* BrowserCommandController::profile() { |
1266 return browser_->profile(); | 1266 return browser_->profile(); |
1267 } | 1267 } |
1268 | 1268 |
1269 } // namespace chrome | 1269 } // namespace chrome |
OLD | NEW |