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

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

Issue 448143008: Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 } 901 }
902 } 902 }
903 903
904 return false; 904 return false;
905 } 905 }
906 906
907 // static 907 // static
908 bool PrerenderManager::IsValidHttpMethod(const std::string& method) { 908 bool PrerenderManager::IsValidHttpMethod(const std::string& method) {
909 // method has been canonicalized to upper case at this point so we can just 909 // method has been canonicalized to upper case at this point so we can just
910 // compare them. 910 // compare them.
911 DCHECK_EQ(method, StringToUpperASCII(method)); 911 DCHECK_EQ(method, base::StringToUpperASCII(method));
912 for (size_t i = 0; i < arraysize(kValidHttpMethods); ++i) { 912 for (size_t i = 0; i < arraysize(kValidHttpMethods); ++i) {
913 if (method.compare(kValidHttpMethods[i]) == 0) 913 if (method.compare(kValidHttpMethods[i]) == 0)
914 return true; 914 return true;
915 } 915 }
916 916
917 return false; 917 return false;
918 } 918 }
919 919
920 // static 920 // static
921 bool PrerenderManager::DoesURLHaveValidScheme(const GURL& url) { 921 bool PrerenderManager::DoesURLHaveValidScheme(const GURL& url) {
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 content::RenderProcessHost* host) { 1918 content::RenderProcessHost* host) {
1919 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1919 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1920 prerender_process_hosts_.erase(host); 1920 prerender_process_hosts_.erase(host);
1921 BrowserThread::PostTask( 1921 BrowserThread::PostTask(
1922 BrowserThread::IO, FROM_HERE, 1922 BrowserThread::IO, FROM_HERE,
1923 base::Bind(&PrerenderTracker::RemovePrerenderCookieStoreOnIOThread, 1923 base::Bind(&PrerenderTracker::RemovePrerenderCookieStoreOnIOThread,
1924 base::Unretained(prerender_tracker()), host->GetID(), false)); 1924 base::Unretained(prerender_tracker()), host->GetID(), false));
1925 } 1925 }
1926 1926
1927 } // namespace prerender 1927 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/net/firefox_proxy_settings.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698