| 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/prerender/prerender_manager.h" | 5 #include "chrome/browser/prerender/prerender_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 } | 738 } |
| 739 } | 739 } |
| 740 | 740 |
| 741 return false; | 741 return false; |
| 742 } | 742 } |
| 743 | 743 |
| 744 // static | 744 // static |
| 745 bool PrerenderManager::IsValidHttpMethod(const std::string& method) { | 745 bool PrerenderManager::IsValidHttpMethod(const std::string& method) { |
| 746 // method has been canonicalized to upper case at this point so we can just | 746 // method has been canonicalized to upper case at this point so we can just |
| 747 // compare them. | 747 // compare them. |
| 748 DCHECK_EQ(method, base::StringToUpperASCII(method)); | 748 DCHECK_EQ(method, base::ToUpperASCII(method)); |
| 749 for (size_t i = 0; i < arraysize(kValidHttpMethods); ++i) { | 749 for (size_t i = 0; i < arraysize(kValidHttpMethods); ++i) { |
| 750 if (method.compare(kValidHttpMethods[i]) == 0) | 750 if (method.compare(kValidHttpMethods[i]) == 0) |
| 751 return true; | 751 return true; |
| 752 } | 752 } |
| 753 | 753 |
| 754 return false; | 754 return false; |
| 755 } | 755 } |
| 756 | 756 |
| 757 // static | 757 // static |
| 758 bool PrerenderManager::DoesURLHaveValidScheme(const GURL& url) { | 758 bool PrerenderManager::DoesURLHaveValidScheme(const GURL& url) { |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 void PrerenderManager::RenderProcessHostDestroyed( | 1288 void PrerenderManager::RenderProcessHostDestroyed( |
| 1289 content::RenderProcessHost* host) { | 1289 content::RenderProcessHost* host) { |
| 1290 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1290 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1291 size_t erased = prerender_process_hosts_.erase(host); | 1291 size_t erased = prerender_process_hosts_.erase(host); |
| 1292 DCHECK_EQ(1u, erased); | 1292 DCHECK_EQ(1u, erased); |
| 1293 } | 1293 } |
| 1294 | 1294 |
| 1295 } // namespace prerender | 1295 } // namespace prerender |
| OLD | NEW |