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

Side by Side Diff: chrome/browser/search_engines/template_url.cc

Issue 254763005: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve a merge conflict. Created 6 years, 7 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
« no previous file with comments | « chrome/browser/search/search.cc ('k') | chrome/browser/search_engines/template_url_parser.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/search_engines/template_url.h" 5 #include "chrome/browser/search_engines/template_url.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 DCHECK(!i->is_post_param); 828 DCHECK(!i->is_post_param);
829 if (!search_terms_args.assisted_query_stats.empty()) { 829 if (!search_terms_args.assisted_query_stats.empty()) {
830 // Get the base URL without substituting AQS to avoid infinite 830 // Get the base URL without substituting AQS to avoid infinite
831 // recursion. We need the URL to find out if it meets all 831 // recursion. We need the URL to find out if it meets all
832 // AQS requirements (e.g. HTTPS protocol check). 832 // AQS requirements (e.g. HTTPS protocol check).
833 // See TemplateURLRef::SearchTermsArgs for more details. 833 // See TemplateURLRef::SearchTermsArgs for more details.
834 SearchTermsArgs search_terms_args_without_aqs(search_terms_args); 834 SearchTermsArgs search_terms_args_without_aqs(search_terms_args);
835 search_terms_args_without_aqs.assisted_query_stats.clear(); 835 search_terms_args_without_aqs.assisted_query_stats.clear();
836 GURL base_url(ReplaceSearchTermsUsingTermsData( 836 GURL base_url(ReplaceSearchTermsUsingTermsData(
837 search_terms_args_without_aqs, search_terms_data, NULL)); 837 search_terms_args_without_aqs, search_terms_data, NULL));
838 if (base_url.SchemeIs(content::kHttpsScheme)) { 838 if (base_url.SchemeIs(url::kHttpsScheme)) {
839 HandleReplacement( 839 HandleReplacement(
840 "aqs", search_terms_args.assisted_query_stats, *i, &url); 840 "aqs", search_terms_args.assisted_query_stats, *i, &url);
841 } 841 }
842 } 842 }
843 break; 843 break;
844 844
845 case GOOGLE_BASE_URL: 845 case GOOGLE_BASE_URL:
846 DCHECK(!i->is_post_param); 846 DCHECK(!i->is_post_param);
847 HandleReplacement( 847 HandleReplacement(
848 std::string(), search_terms_data.GoogleBaseURLValue(), *i, &url); 848 std::string(), search_terms_data.GoogleBaseURLValue(), *i, &url);
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 // patterns. This means that given patterns 1330 // patterns. This means that given patterns
1331 // [ "http://foo/#q={searchTerms}", "http://foo/?q={searchTerms}" ], 1331 // [ "http://foo/#q={searchTerms}", "http://foo/?q={searchTerms}" ],
1332 // calling ExtractSearchTermsFromURL() on "http://foo/?q=bar#q=' would 1332 // calling ExtractSearchTermsFromURL() on "http://foo/?q=bar#q=' would
1333 // return false. This is important for at least Google, where such URLs 1333 // return false. This is important for at least Google, where such URLs
1334 // are invalid. 1334 // are invalid.
1335 return !search_terms->empty(); 1335 return !search_terms->empty();
1336 } 1336 }
1337 } 1337 }
1338 return false; 1338 return false;
1339 } 1339 }
OLDNEW
« no previous file with comments | « chrome/browser/search/search.cc ('k') | chrome/browser/search_engines/template_url_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698