| 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 // Chromium settings and storage represent user-selected preferences and | 5 // Chromium settings and storage represent user-selected preferences and |
| 6 // information and MUST not be extracted, overwritten or modified except | 6 // information and MUST not be extracted, overwritten or modified except |
| 7 // through Chromium defined APIs. | 7 // through Chromium defined APIs. |
| 8 | 8 |
| 9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| 10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // Get a list of all web intent service defaults for the given |action|. | 188 // Get a list of all web intent service defaults for the given |action|. |
| 189 // |consumer| must not be null. | 189 // |consumer| must not be null. |
| 190 Handle GetDefaultWebIntentServicesForAction(const string16& action, | 190 Handle GetDefaultWebIntentServicesForAction(const string16& action, |
| 191 WebDataServiceConsumer* consumer); | 191 WebDataServiceConsumer* consumer); |
| 192 | 192 |
| 193 // Get a list of all registered web intent service defaults. | 193 // Get a list of all registered web intent service defaults. |
| 194 // |consumer| must not be null. | 194 // |consumer| must not be null. |
| 195 Handle GetAllDefaultWebIntentServices(WebDataServiceConsumer* consumer); | 195 Handle GetAllDefaultWebIntentServices(WebDataServiceConsumer* consumer); |
| 196 #endif | 196 #endif |
| 197 | 197 |
| 198 ////////////////////////////////////////////////////////////////////////////// | |
| 199 // | |
| 200 // Token Service | |
| 201 // | |
| 202 ////////////////////////////////////////////////////////////////////////////// | |
| 203 | |
| 204 // Set a token to use for a specified service. | |
| 205 void SetTokenForService(const std::string& service, | |
| 206 const std::string& token); | |
| 207 | |
| 208 // Remove all tokens stored in the web database. | |
| 209 void RemoveAllTokens(); | |
| 210 | |
| 211 // Null on failure. Success is WDResult<std::vector<std::string> > | |
| 212 virtual Handle GetAllTokens(WebDataServiceConsumer* consumer); | |
| 213 | |
| 214 #if defined(OS_WIN) | 198 #if defined(OS_WIN) |
| 215 ////////////////////////////////////////////////////////////////////////////// | 199 ////////////////////////////////////////////////////////////////////////////// |
| 216 // | 200 // |
| 217 // IE7/8 Password Access (used by PasswordStoreWin - do not use elsewhere) | 201 // IE7/8 Password Access (used by PasswordStoreWin - do not use elsewhere) |
| 218 // | 202 // |
| 219 ////////////////////////////////////////////////////////////////////////////// | 203 ////////////////////////////////////////////////////////////////////////////// |
| 220 | 204 |
| 221 // Adds |info| to the list of imported passwords from ie7/ie8. | 205 // Adds |info| to the list of imported passwords from ie7/ie8. |
| 222 void AddIE7Login(const IE7PasswordInfo& info); | 206 void AddIE7Login(const IE7PasswordInfo& info); |
| 223 | 207 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 const DefaultWebIntentService& service); | 277 const DefaultWebIntentService& service); |
| 294 WebDatabase::State RemoveDefaultWebIntentServiceImpl( | 278 WebDatabase::State RemoveDefaultWebIntentServiceImpl( |
| 295 const DefaultWebIntentService& service); | 279 const DefaultWebIntentService& service); |
| 296 WebDatabase::State RemoveWebIntentServiceDefaultsImpl( | 280 WebDatabase::State RemoveWebIntentServiceDefaultsImpl( |
| 297 const GURL& service_url); | 281 const GURL& service_url); |
| 298 scoped_ptr<WDTypedResult> GetDefaultWebIntentServicesForActionImpl( | 282 scoped_ptr<WDTypedResult> GetDefaultWebIntentServicesForActionImpl( |
| 299 const string16& action); | 283 const string16& action); |
| 300 scoped_ptr<WDTypedResult> GetAllDefaultWebIntentServicesImpl(); | 284 scoped_ptr<WDTypedResult> GetAllDefaultWebIntentServicesImpl(); |
| 301 #endif | 285 #endif |
| 302 | 286 |
| 303 ////////////////////////////////////////////////////////////////////////////// | |
| 304 // | |
| 305 // Token Service. | |
| 306 // | |
| 307 ////////////////////////////////////////////////////////////////////////////// | |
| 308 | |
| 309 WebDatabase::State RemoveAllTokensImpl(WebDatabase* db); | |
| 310 WebDatabase::State SetTokenForServiceImpl(const std::string& service, | |
| 311 const std::string& token, WebDatabase* db); | |
| 312 scoped_ptr<WDTypedResult> GetAllTokensImpl(WebDatabase* db); | |
| 313 | |
| 314 #if defined(OS_WIN) | 287 #if defined(OS_WIN) |
| 315 ////////////////////////////////////////////////////////////////////////////// | 288 ////////////////////////////////////////////////////////////////////////////// |
| 316 // | 289 // |
| 317 // Password manager. | 290 // Password manager. |
| 318 // | 291 // |
| 319 ////////////////////////////////////////////////////////////////////////////// | 292 ////////////////////////////////////////////////////////////////////////////// |
| 320 WebDatabase::State AddIE7LoginImpl( | 293 WebDatabase::State AddIE7LoginImpl( |
| 321 const IE7PasswordInfo& info, WebDatabase* db); | 294 const IE7PasswordInfo& info, WebDatabase* db); |
| 322 WebDatabase::State RemoveIE7LoginImpl( | 295 WebDatabase::State RemoveIE7LoginImpl( |
| 323 const IE7PasswordInfo& info, WebDatabase* db); | 296 const IE7PasswordInfo& info, WebDatabase* db); |
| 324 scoped_ptr<WDTypedResult> GetIE7LoginImpl( | 297 scoped_ptr<WDTypedResult> GetIE7LoginImpl( |
| 325 const IE7PasswordInfo& info, WebDatabase* db); | 298 const IE7PasswordInfo& info, WebDatabase* db); |
| 326 #endif // defined(OS_WIN) | 299 #endif // defined(OS_WIN) |
| 327 | 300 |
| 328 DISALLOW_COPY_AND_ASSIGN(WebDataService); | 301 DISALLOW_COPY_AND_ASSIGN(WebDataService); |
| 329 }; | 302 }; |
| 330 | 303 |
| 331 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 304 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| OLD | NEW |