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

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

Issue 324283003: Move search_terms_data to components/search_engines (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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/search_engines/template_url_parser.h" 5 #include "chrome/browser/search_engines/template_url_parser.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "chrome/browser/search_engines/search_terms_data.h"
17 #include "chrome/browser/search_engines/template_url.h" 16 #include "chrome/browser/search_engines/template_url.h"
18 #include "chrome/browser/search_engines/template_url_service.h" 17 #include "chrome/browser/search_engines/template_url_service.h"
18 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
19 #include "libxml/parser.h" 19 #include "libxml/parser.h"
20 #include "libxml/xmlwriter.h" 20 #include "libxml/xmlwriter.h"
21 #include "ui/gfx/favicon_size.h" 21 #include "ui/gfx/favicon_size.h"
22 #include "url/gurl.h" 22 #include "url/gurl.h"
23 #include "url/url_constants.h" 23 #include "url/url_constants.h"
24 24
25 namespace { 25 namespace {
26 26
27 // NOTE: libxml uses the UTF-8 encoding. As 0-127 of UTF-8 corresponds 27 // NOTE: libxml uses the UTF-8 encoding. As 0-127 of UTF-8 corresponds
28 // to that of char, the following names are all in terms of char. This avoids 28 // to that of char, the following names are all in terms of char. This avoids
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 memset(&sax_handler, 0, sizeof(sax_handler)); 487 memset(&sax_handler, 0, sizeof(sax_handler));
488 sax_handler.startElement = &TemplateURLParsingContext::StartElementImpl; 488 sax_handler.startElement = &TemplateURLParsingContext::StartElementImpl;
489 sax_handler.endElement = &TemplateURLParsingContext::EndElementImpl; 489 sax_handler.endElement = &TemplateURLParsingContext::EndElementImpl;
490 sax_handler.characters = &TemplateURLParsingContext::CharactersImpl; 490 sax_handler.characters = &TemplateURLParsingContext::CharactersImpl;
491 int error = xmlSAXUserParseMemory(&sax_handler, &context, data, 491 int error = xmlSAXUserParseMemory(&sax_handler, &context, data,
492 static_cast<int>(length)); 492 static_cast<int>(length));
493 xmlSubstituteEntitiesDefault(last_sub_entities_value); 493 xmlSubstituteEntitiesDefault(last_sub_entities_value);
494 494
495 return error ? NULL : context.GetTemplateURL(profile, show_in_default_list); 495 return error ? NULL : context.GetTemplateURL(profile, show_in_default_list);
496 } 496 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url.cc ('k') | chrome/browser/search_engines/template_url_prepopulate_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698