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

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

Issue 3146007: Fix for issue 51693, which was a regression from integrating the open source... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « chrome/browser/rlz/rlz.cc ('k') | chrome/browser/search_engines/template_url_model.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/i18n/icu_string_conversions.h" 8 #include "base/i18n/icu_string_conversions.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 if (accepted_suggestion >= 0) 332 if (accepted_suggestion >= 0)
333 url.insert(i->index, "oq=" + UTF16ToUTF8(encoded_original_query) + 333 url.insert(i->index, "oq=" + UTF16ToUTF8(encoded_original_query) +
334 "&"); 334 "&");
335 break; 335 break;
336 336
337 case GOOGLE_RLZ: { 337 case GOOGLE_RLZ: {
338 // On platforms that don't have RLZ, we still want this branch 338 // On platforms that don't have RLZ, we still want this branch
339 // to happen so that we replace the RLZ template with the 339 // to happen so that we replace the RLZ template with the
340 // empty string. (If we don't handle this case, we hit a 340 // empty string. (If we don't handle this case, we hit a
341 // NOTREACHED below.) 341 // NOTREACHED below.)
342 #if defined(OS_WIN) 342 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
343 std::wstring rlz_string; 343 std::wstring rlz_string;
344 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string); 344 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string);
345 if (!rlz_string.empty()) { 345 if (!rlz_string.empty()) {
346 rlz_string = L"rlz=" + rlz_string + L"&"; 346 rlz_string = L"rlz=" + rlz_string + L"&";
347 url.insert(i->index, WideToUTF8(rlz_string)); 347 url.insert(i->index, WideToUTF8(rlz_string));
348 } 348 }
349 #endif 349 #endif
350 break; 350 break;
351 } 351 }
352 352
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 } 620 }
621 621
622 std::string TemplateURL::GetExtensionId() const { 622 std::string TemplateURL::GetExtensionId() const {
623 DCHECK(IsExtensionKeyword()); 623 DCHECK(IsExtensionKeyword());
624 return GURL(url_.url()).host(); 624 return GURL(url_.url()).host();
625 } 625 }
626 626
627 bool TemplateURL::IsExtensionKeyword() const { 627 bool TemplateURL::IsExtensionKeyword() const {
628 return GURL(url_.url()).SchemeIs(chrome::kExtensionScheme); 628 return GURL(url_.url()).SchemeIs(chrome::kExtensionScheme);
629 } 629 }
OLDNEW
« no previous file with comments | « chrome/browser/rlz/rlz.cc ('k') | chrome/browser/search_engines/template_url_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698