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

Unified Diff: chrome/browser/autocomplete/autocomplete_controller.h

Issue 376863003: Stop manually calling AddRef/Release for AutocompleteController::providers_ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_controller.h
diff --git a/chrome/browser/autocomplete/autocomplete_controller.h b/chrome/browser/autocomplete/autocomplete_controller.h
index 51794ce1303b192a82efed4b598955e4dde92e12..9fedb1d63bf141d6f50ba9b15a9816e43071a4f8 100644
--- a/chrome/browser/autocomplete/autocomplete_controller.h
+++ b/chrome/browser/autocomplete/autocomplete_controller.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
@@ -46,6 +47,8 @@ class ZeroSuggestProvider;
// matches from a series of providers into one AutocompleteResult.
class AutocompleteController : public AutocompleteProviderListener {
public:
+ typedef std::vector<scoped_refptr<AutocompleteProvider> > Providers;
+
// |provider_types| is a bitmap containing AutocompleteProvider::Type values
// that will (potentially, depending on platform, flags, etc.) be
// instantiated. |template_url_service| is used to create URLs from the
@@ -129,7 +132,7 @@ class AutocompleteController : public AutocompleteProviderListener {
const AutocompleteResult& result() const { return result_; }
bool done() const { return done_; }
- const ACProviders* providers() const { return &providers_; }
+ const Providers& providers() const { return providers_; }
const base::TimeTicks& last_time_default_match_changed() const {
return last_time_default_match_changed_;
@@ -191,7 +194,7 @@ class AutocompleteController : public AutocompleteProviderListener {
AutocompleteControllerDelegate* delegate_;
// A list of all providers.
- ACProviders providers_;
+ Providers providers_;
HistoryURLProvider* history_url_provider_;
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698