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 #include "chrome/browser/webdata/web_intents_table.h" | 5 #include "chrome/browser/webdata/web_intents_table.h" |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/i18n/case_conversion.h" | 8 #include "base/i18n/case_conversion.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 const DefaultWebIntentService& default_service) { | 316 const DefaultWebIntentService& default_service) { |
317 sql::Statement s(db_->GetUniqueStatement( | 317 sql::Statement s(db_->GetUniqueStatement( |
318 "DELETE FROM web_intents_defaults " | 318 "DELETE FROM web_intents_defaults " |
319 "WHERE action = ? AND type = ? AND url_pattern = ?")); | 319 "WHERE action = ? AND type = ? AND url_pattern = ?")); |
320 s.BindString16(0, default_service.action); | 320 s.BindString16(0, default_service.action); |
321 s.BindString16(1, default_service.type); | 321 s.BindString16(1, default_service.type); |
322 s.BindString(2, default_service.url_pattern.GetAsString()); | 322 s.BindString(2, default_service.url_pattern.GetAsString()); |
323 | 323 |
324 return s.Run(); | 324 return s.Run(); |
325 } | 325 } |
| 326 |
| 327 bool WebIntentsTable::RemoveServiceDefaults(const GURL& service_url) { |
| 328 sql::Statement s(db_->GetUniqueStatement( |
| 329 "DELETE FROM web_intents_defaults WHERE service_url = ?")); |
| 330 s.BindString(0, service_url.spec()); |
| 331 |
| 332 return s.Run(); |
| 333 } |
OLD | NEW |