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

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

Issue 66073: Makes the omnibox show past searches and suggestions for keywords.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/rlz/rlz.h" 10 #include "chrome/browser/rlz/rlz.h"
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 int favicon_path_len = arraysize(favicon_path) - 1; 484 int favicon_path_len = arraysize(favicon_path) - 1;
485 485
486 rep.SetPath(favicon_path, url_parse::Component(0, favicon_path_len)); 486 rep.SetPath(favicon_path, url_parse::Component(0, favicon_path_len));
487 rep.ClearUsername(); 487 rep.ClearUsername();
488 rep.ClearPassword(); 488 rep.ClearPassword();
489 rep.ClearQuery(); 489 rep.ClearQuery();
490 rep.ClearRef(); 490 rep.ClearRef();
491 return url.ReplaceComponents(rep); 491 return url.ReplaceComponents(rep);
492 } 492 }
493 493
494 // static
495 bool TemplateURL::SupportsReplacement(const TemplateURL* turl) {
496 return turl && turl->url() && turl->url()->SupportsReplacement();
497 }
498
494 void TemplateURL::SetSuggestionsURL(const std::wstring& suggestions_url, 499 void TemplateURL::SetSuggestionsURL(const std::wstring& suggestions_url,
495 int index_offset, 500 int index_offset,
496 int page_offset) { 501 int page_offset) {
497 suggestions_url_.Set(suggestions_url, index_offset, page_offset); 502 suggestions_url_.Set(suggestions_url, index_offset, page_offset);
498 } 503 }
499 504
500 void TemplateURL::SetURL(const std::wstring& url, 505 void TemplateURL::SetURL(const std::wstring& url,
501 int index_offset, 506 int index_offset,
502 int page_offset) { 507 int page_offset) {
503 url_.Set(url, index_offset, page_offset); 508 url_.Set(url, index_offset, page_offset);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 } 558 }
554 return GURL(); 559 return GURL();
555 } 560 }
556 561
557 void TemplateURL::InvalidateCachedValues() const { 562 void TemplateURL::InvalidateCachedValues() const {
558 url_.InvalidateCachedValues(); 563 url_.InvalidateCachedValues();
559 suggestions_url_.InvalidateCachedValues(); 564 suggestions_url_.InvalidateCachedValues();
560 if (autogenerate_keyword_) 565 if (autogenerate_keyword_)
561 keyword_.clear(); 566 keyword_.clear();
562 } 567 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url.h ('k') | chrome/browser/views/keyword_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698