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

Side by Side Diff: chrome/browser/search_engines/template_url_service.h

Issue 13932025: Cancel pending requests for TemplateURLs in Shutdown, instead of dtor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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) 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 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const char* const keyword; 77 const char* const keyword;
78 const char* const url; 78 const char* const url;
79 const char* const content; 79 const char* const content;
80 }; 80 };
81 81
82 explicit TemplateURLService(Profile* profile); 82 explicit TemplateURLService(Profile* profile);
83 // The following is for testing. 83 // The following is for testing.
84 TemplateURLService(const Initializer* initializers, const int count); 84 TemplateURLService(const Initializer* initializers, const int count);
85 virtual ~TemplateURLService(); 85 virtual ~TemplateURLService();
86 86
87 // ProfileKeyedService implementation.
88 virtual void Shutdown() OVERRIDE;
Peter Kasting 2013/04/12 22:32:17 Please declare this just above Observe() so it is
89
87 // Generates a suitable keyword for the specified url, which must be valid. 90 // Generates a suitable keyword for the specified url, which must be valid.
88 // This is guaranteed not to return an empty string, since TemplateURLs should 91 // This is guaranteed not to return an empty string, since TemplateURLs should
89 // never have an empty keyword. 92 // never have an empty keyword.
90 static string16 GenerateKeyword(const GURL& url); 93 static string16 GenerateKeyword(const GURL& url);
91 94
92 // Removes any unnecessary characters from a user input keyword. 95 // Removes any unnecessary characters from a user input keyword.
93 // This removes the leading scheme, "www." and any trailing slash. 96 // This removes the leading scheme, "www." and any trailing slash.
94 static string16 CleanUserInputKeyword(const string16& keyword); 97 static string16 CleanUserInputKeyword(const string16& keyword);
95 98
96 // Returns the search url for t_url. Returns an empty GURL if t_url has no 99 // Returns the search url for t_url. Returns an empty GURL if t_url has no
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 670
668 // This is used to log the origin of changes to the default search provider. 671 // This is used to log the origin of changes to the default search provider.
669 // We set this value to increasingly specific values when we know what is the 672 // We set this value to increasingly specific values when we know what is the
670 // cause/origin of a default search change. 673 // cause/origin of a default search change.
671 DefaultSearchChangeOrigin dsp_change_origin_; 674 DefaultSearchChangeOrigin dsp_change_origin_;
672 675
673 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); 676 DISALLOW_COPY_AND_ASSIGN(TemplateURLService);
674 }; 677 };
675 678
676 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 679 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698