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

Side by Side Diff: chrome/browser/prerender/prerender_manager.cc

Issue 1280473002: Update ToLower/UpperASCII API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 (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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698