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

Side by Side Diff: chrome/browser/history/url_database.cc

Issue 23112033: content: Move kHttpsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « chrome/browser/history/in_memory_url_index.cc ('k') | chrome/browser/history/visit_database.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/history/url_database.h" 5 #include "chrome/browser/history/url_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 FillURLRow(statement, &info); 305 FillURLRow(statement, &info);
306 if (info.url().is_valid()) 306 if (info.url().is_valid())
307 results->push_back(info); 307 results->push_back(info);
308 } 308 }
309 return !results->empty(); 309 return !results->empty();
310 } 310 }
311 311
312 bool URLDatabase::IsTypedHost(const std::string& host) { 312 bool URLDatabase::IsTypedHost(const std::string& host) {
313 const char* schemes[] = { 313 const char* schemes[] = {
314 chrome::kHttpScheme, 314 chrome::kHttpScheme,
315 chrome::kHttpsScheme, 315 content::kHttpsScheme,
316 chrome::kFtpScheme 316 chrome::kFtpScheme
317 }; 317 };
318 URLRows dummy; 318 URLRows dummy;
319 for (size_t i = 0; i < arraysize(schemes); ++i) { 319 for (size_t i = 0; i < arraysize(schemes); ++i) {
320 std::string scheme_and_host(schemes[i]); 320 std::string scheme_and_host(schemes[i]);
321 scheme_and_host += content::kStandardSchemeSeparator + host; 321 scheme_and_host += content::kStandardSchemeSeparator + host;
322 if (AutocompleteForPrefix(scheme_and_host + '/', 1, true, &dummy) || 322 if (AutocompleteForPrefix(scheme_and_host + '/', 1, true, &dummy) ||
323 AutocompleteForPrefix(scheme_and_host + ':', 1, true, &dummy)) 323 AutocompleteForPrefix(scheme_and_host + ':', 1, true, &dummy))
324 return true; 324 return true;
325 } 325 }
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 return GetDB().Execute(sql.c_str()); 595 return GetDB().Execute(sql.c_str());
596 } 596 }
597 597
598 bool URLDatabase::CreateMainURLIndex() { 598 bool URLDatabase::CreateMainURLIndex() {
599 // Index over URLs so we can quickly look up based on URL. 599 // Index over URLs so we can quickly look up based on URL.
600 return GetDB().Execute( 600 return GetDB().Execute(
601 "CREATE INDEX IF NOT EXISTS urls_url_index ON urls (url)"); 601 "CREATE INDEX IF NOT EXISTS urls_url_index ON urls (url)");
602 } 602 }
603 603
604 } // namespace history 604 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/in_memory_url_index.cc ('k') | chrome/browser/history/visit_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698