OLD | NEW |
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_WEBDATA_COMMON_WEB_DATA_RESULTS_H_ | 5 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_ |
6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_ | 6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include <stdint.h> |
| 9 |
9 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" |
| 12 #include "build/build_config.h" |
10 #include "components/webdata/common/webdata_export.h" | 13 #include "components/webdata/common/webdata_export.h" |
11 | 14 |
12 class WDTypedResult; | 15 class WDTypedResult; |
13 | 16 |
14 // | 17 // |
15 // Result types for WebDataService. | 18 // Result types for WebDataService. |
16 // | 19 // |
17 typedef enum { | 20 typedef enum { |
18 BOOL_RESULT = 1, // WDResult<bool> | 21 BOOL_RESULT = 1, // WDResult<bool> |
19 KEYWORDS_RESULT, // WDResult<WDKeywordsResult> | 22 KEYWORDS_RESULT, // WDResult<WDKeywordsResult> |
20 INT64_RESULT, // WDResult<int64> | 23 INT64_RESULT, // WDResult<int64_t> |
21 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
22 PASSWORD_IE7_RESULT, // WDResult<IE7PasswordInfo> | 25 PASSWORD_IE7_RESULT, // WDResult<IE7PasswordInfo> |
23 #endif | 26 #endif |
24 WEB_APP_IMAGES, // WDResult<WDAppImagesResult> | 27 WEB_APP_IMAGES, // WDResult<WDAppImagesResult> |
25 TOKEN_RESULT, // WDResult<std::vector<std::string>> | 28 TOKEN_RESULT, // WDResult<std::vector<std::string>> |
26 AUTOFILL_VALUE_RESULT, // WDResult<std::vector<base::string16>> | 29 AUTOFILL_VALUE_RESULT, // WDResult<std::vector<base::string16>> |
27 AUTOFILL_CHANGES, // WDResult<std::vector<AutofillChange>> | 30 AUTOFILL_CHANGES, // WDResult<std::vector<AutofillChange>> |
28 AUTOFILL_PROFILE_RESULT, // WDResult<AutofillProfile> | 31 AUTOFILL_PROFILE_RESULT, // WDResult<AutofillProfile> |
29 AUTOFILL_PROFILES_RESULT, // WDResult<std::vector<AutofillProfile*>> | 32 AUTOFILL_PROFILES_RESULT, // WDResult<std::vector<AutofillProfile*>> |
30 AUTOFILL_CREDITCARD_RESULT, // WDResult<CreditCard> | 33 AUTOFILL_CREDITCARD_RESULT, // WDResult<CreditCard> |
31 AUTOFILL_CREDITCARDS_RESULT, // WDResult<std::vector<CreditCard*>> | 34 AUTOFILL_CREDITCARDS_RESULT, // WDResult<std::vector<CreditCard*>> |
32 } WDResultType; | 35 } WDResultType; |
33 | 36 |
34 | 37 |
35 typedef base::Callback<void(const WDTypedResult*)> DestroyCallback; | 38 typedef base::Callback<void(const WDTypedResult*)> DestroyCallback; |
36 | 39 |
37 // | 40 // |
38 // The top level class for a result. | 41 // The top level class for a result. |
39 // | 42 // |
40 class WEBDATA_EXPORT WDTypedResult { | 43 class WEBDATA_EXPORT WDTypedResult { |
41 public: | 44 public: |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 } | 103 } |
101 } | 104 } |
102 | 105 |
103 private: | 106 private: |
104 DestroyCallback callback_; | 107 DestroyCallback callback_; |
105 | 108 |
106 DISALLOW_COPY_AND_ASSIGN(WDDestroyableResult); | 109 DISALLOW_COPY_AND_ASSIGN(WDDestroyableResult); |
107 }; | 110 }; |
108 | 111 |
109 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_ | 112 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_ |
OLD | NEW |