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

Side by Side Diff: components/autofill/browser/autocomplete_history_manager.h

Issue 13973004: Convert string16 -> base::string16 in components/ (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 COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ 6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 24 matching lines...) Expand all
35 35
36 // WebDataServiceConsumer implementation. 36 // WebDataServiceConsumer implementation.
37 virtual void OnWebDataServiceRequestDone( 37 virtual void OnWebDataServiceRequestDone(
38 WebDataServiceBase::Handle h, 38 WebDataServiceBase::Handle h,
39 const WDTypedResult* result) OVERRIDE; 39 const WDTypedResult* result) OVERRIDE;
40 40
41 // Pass-through functions that are called by AutofillManager, after it has 41 // Pass-through functions that are called by AutofillManager, after it has
42 // dispatched a message. 42 // dispatched a message.
43 void OnGetAutocompleteSuggestions( 43 void OnGetAutocompleteSuggestions(
44 int query_id, 44 int query_id,
45 const string16& name, 45 const base::string16& name,
46 const string16& prefix, 46 const base::string16& prefix,
47 const std::vector<string16>& autofill_values, 47 const std::vector<base::string16>& autofill_values,
48 const std::vector<string16>& autofill_labels, 48 const std::vector<base::string16>& autofill_labels,
49 const std::vector<string16>& autofill_icons, 49 const std::vector<base::string16>& autofill_icons,
50 const std::vector<int>& autofill_unique_ids); 50 const std::vector<int>& autofill_unique_ids);
51 void OnFormSubmitted(const FormData& form); 51 void OnFormSubmitted(const FormData& form);
52 52
53 // Must be public for the external delegate to use. 53 // Must be public for the external delegate to use.
54 void OnRemoveAutocompleteEntry(const string16& name, const string16& value); 54 void OnRemoveAutocompleteEntry(const base::string16& name,
55 const base::string16& value);
55 56
56 // Sets our external delegate. 57 // Sets our external delegate.
57 void SetExternalDelegate(AutofillExternalDelegate* delegate); 58 void SetExternalDelegate(AutofillExternalDelegate* delegate);
58 59
59 protected: 60 protected:
60 friend class AutofillManagerTest; 61 friend class AutofillManagerTest;
61 62
62 // Sends the given |suggestions| for display in the Autofill popup. 63 // Sends the given |suggestions| for display in the Autofill popup.
63 void SendSuggestions(const std::vector<string16>* suggestions); 64 void SendSuggestions(const std::vector<base::string16>* suggestions);
64 65
65 private: 66 private:
66 // Cancels the currently pending WebDataService query, if there is one. 67 // Cancels the currently pending WebDataService query, if there is one.
67 void CancelPendingQuery(); 68 void CancelPendingQuery();
68 69
69 content::BrowserContext* browser_context_; 70 content::BrowserContext* browser_context_;
70 scoped_refptr<AutofillWebDataService> autofill_data_; 71 scoped_refptr<AutofillWebDataService> autofill_data_;
71 72
72 BooleanPrefMember autofill_enabled_; 73 BooleanPrefMember autofill_enabled_;
73 74
74 // When the manager makes a request from WebDataServiceBase, the database is 75 // When the manager makes a request from WebDataServiceBase, the database is
75 // queried on another thread, we record the query handle until we get called 76 // queried on another thread, we record the query handle until we get called
76 // back. We also store the autofill results so we can send them together. 77 // back. We also store the autofill results so we can send them together.
77 WebDataServiceBase::Handle pending_query_handle_; 78 WebDataServiceBase::Handle pending_query_handle_;
78 int query_id_; 79 int query_id_;
79 std::vector<string16> autofill_values_; 80 std::vector<base::string16> autofill_values_;
80 std::vector<string16> autofill_labels_; 81 std::vector<base::string16> autofill_labels_;
81 std::vector<string16> autofill_icons_; 82 std::vector<base::string16> autofill_icons_;
82 std::vector<int> autofill_unique_ids_; 83 std::vector<int> autofill_unique_ids_;
83 84
84 // Delegate to perform external processing (display, selection) on 85 // Delegate to perform external processing (display, selection) on
85 // our behalf. Weak. 86 // our behalf. Weak.
86 AutofillExternalDelegate* external_delegate_; 87 AutofillExternalDelegate* external_delegate_;
87 88
88 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); 89 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager);
89 }; 90 };
90 91
91 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ 92 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698