| 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/autofill_profile_syncable_service.h" | 5 #include "chrome/browser/webdata/autofill_profile_syncable_service.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/autofill/autofill_profile.h" | 10 #include "chrome/browser/autofill/autofill_profile.h" |
| 11 #include "chrome/browser/autofill/form_group.h" | 11 #include "chrome/browser/autofill/form_group.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/sync/api/sync_error.h" | 13 #include "chrome/browser/sync/api/sync_error.h" |
| 14 #include "chrome/browser/sync/protocol/sync.pb.h" | |
| 15 #include "chrome/browser/webdata/autofill_table.h" | 14 #include "chrome/browser/webdata/autofill_table.h" |
| 16 #include "chrome/browser/webdata/web_data_service.h" | 15 #include "chrome/browser/webdata/web_data_service.h" |
| 17 #include "chrome/browser/webdata/web_database.h" | 16 #include "chrome/browser/webdata/web_database.h" |
| 18 #include "chrome/common/chrome_notification_types.h" | 17 #include "chrome/common/chrome_notification_types.h" |
| 19 #include "chrome/common/guid.h" | 18 #include "chrome/common/guid.h" |
| 20 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
| 21 #include "content/public/browser/notification_details.h" | 20 #include "content/public/browser/notification_details.h" |
| 22 #include "content/public/browser/notification_source.h" | 21 #include "content/public/browser/notification_source.h" |
| 22 #include "sync/protocol/sync.pb.h" |
| 23 | 23 |
| 24 using content::BrowserThread; | 24 using content::BrowserThread; |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 std::string LimitData(const std::string& data) { | 28 std::string LimitData(const std::string& data) { |
| 29 std::string sanitized_value(data); | 29 std::string sanitized_value(data); |
| 30 if (sanitized_value.length() > AutofillTable::kMaxDataLength) | 30 if (sanitized_value.length() > AutofillTable::kMaxDataLength) |
| 31 sanitized_value.resize(AutofillTable::kMaxDataLength); | 31 sanitized_value.resize(AutofillTable::kMaxDataLength); |
| 32 return sanitized_value; | 32 return sanitized_value; |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 } | 503 } |
| 504 | 504 |
| 505 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { | 505 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { |
| 506 return web_data_service_->GetDatabase()->GetAutofillTable(); | 506 return web_data_service_->GetDatabase()->GetAutofillTable(); |
| 507 } | 507 } |
| 508 | 508 |
| 509 AutofillProfileSyncableService::DataBundle::DataBundle() {} | 509 AutofillProfileSyncableService::DataBundle::DataBundle() {} |
| 510 | 510 |
| 511 AutofillProfileSyncableService::DataBundle::~DataBundle() { | 511 AutofillProfileSyncableService::DataBundle::~DataBundle() { |
| 512 } | 512 } |
| OLD | NEW |