OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extensions/extension_web_ui.h" | 5 #include "chrome/browser/extensions/extension_web_ui.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 Profile::FromBrowserContext(tab->browser_context()); | 344 Profile::FromBrowserContext(tab->browser_context()); |
345 if (tab_profile != profile) | 345 if (tab_profile != profile) |
346 continue; | 346 continue; |
347 | 347 |
348 GURL url = tab->GetURL(); | 348 GURL url = tab->GetURL(); |
349 if (!url.SchemeIs(chrome::kChromeUIScheme) || url.host() != page) | 349 if (!url.SchemeIs(chrome::kChromeUIScheme) || url.host() != page) |
350 continue; | 350 continue; |
351 | 351 |
352 // Don't use Reload() since |url| isn't the same as the internal URL | 352 // Don't use Reload() since |url| isn't the same as the internal URL |
353 // that NavigationController has. | 353 // that NavigationController has. |
354 tab->controller().LoadURL(url, url, content::PAGE_TRANSITION_RELOAD, | 354 tab->controller().LoadURL( |
355 std::string()); | 355 url, content::Referrer(url, WebKit::WebReferrerPolicyDefault), |
| 356 content::PAGE_TRANSITION_RELOAD, std::string()); |
356 } | 357 } |
357 } | 358 } |
358 } | 359 } |
359 | 360 |
360 // static | 361 // static |
361 void ExtensionWebUI::UnregisterChromeURLOverride(const std::string& page, | 362 void ExtensionWebUI::UnregisterChromeURLOverride(const std::string& page, |
362 Profile* profile, Value* override) { | 363 Profile* profile, Value* override) { |
363 if (!override) | 364 if (!override) |
364 return; | 365 return; |
365 PrefService* prefs = profile->GetPrefs(); | 366 PrefService* prefs = profile->GetPrefs(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 } | 401 } |
401 | 402 |
402 // static | 403 // static |
403 void ExtensionWebUI::GetFaviconForURL(Profile* profile, | 404 void ExtensionWebUI::GetFaviconForURL(Profile* profile, |
404 FaviconService::GetFaviconRequest* request, const GURL& page_url) { | 405 FaviconService::GetFaviconRequest* request, const GURL& page_url) { |
405 // tracker deletes itself when done. | 406 // tracker deletes itself when done. |
406 ExtensionWebUIImageLoadingTracker* tracker = | 407 ExtensionWebUIImageLoadingTracker* tracker = |
407 new ExtensionWebUIImageLoadingTracker(profile, request, page_url); | 408 new ExtensionWebUIImageLoadingTracker(profile, request, page_url); |
408 tracker->Init(); | 409 tracker->Init(); |
409 } | 410 } |
OLD | NEW |