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/sync/syncable/directory_backing_store.h" | 5 #include "chrome/browser/sync/syncable/directory_backing_store.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 sync_pb::EntitySpecifics* mutable_new_value) { | 673 sync_pb::EntitySpecifics* mutable_new_value) { |
674 // Extract data from the column trio we expect. | 674 // Extract data from the column trio we expect. |
675 bool old_is_bookmark_object = old_value_query->ColumnBool(old_value_column); | 675 bool old_is_bookmark_object = old_value_query->ColumnBool(old_value_column); |
676 std::string old_url = old_value_query->ColumnString(old_value_column + 1); | 676 std::string old_url = old_value_query->ColumnString(old_value_column + 1); |
677 std::string old_favicon; | 677 std::string old_favicon; |
678 old_value_query->ColumnBlobAsString(old_value_column + 2, &old_favicon); | 678 old_value_query->ColumnBlobAsString(old_value_column + 2, &old_favicon); |
679 bool old_is_dir = old_value_query->ColumnBool(old_value_column + 3); | 679 bool old_is_dir = old_value_query->ColumnBool(old_value_column + 3); |
680 | 680 |
681 if (old_is_bookmark_object) { | 681 if (old_is_bookmark_object) { |
682 sync_pb::BookmarkSpecifics* bookmark_data = | 682 sync_pb::BookmarkSpecifics* bookmark_data = |
683 mutable_new_value->MutableExtension(sync_pb::bookmark); | 683 mutable_new_value->mutable_bookmark(); |
684 if (!old_is_dir) { | 684 if (!old_is_dir) { |
685 bookmark_data->set_url(old_url); | 685 bookmark_data->set_url(old_url); |
686 bookmark_data->set_favicon(old_favicon); | 686 bookmark_data->set_favicon(old_favicon); |
687 } | 687 } |
688 } | 688 } |
689 } | 689 } |
690 | 690 |
691 } // namespace | 691 } // namespace |
692 | 692 |
693 bool DirectoryBackingStore::MigrateVersion68To69() { | 693 bool DirectoryBackingStore::MigrateVersion68To69() { |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 "id TEXT primary key, " | 1092 "id TEXT primary key, " |
1093 "name TEXT, " | 1093 "name TEXT, " |
1094 "store_birthday TEXT, " | 1094 "store_birthday TEXT, " |
1095 "db_create_version TEXT, " | 1095 "db_create_version TEXT, " |
1096 "db_create_time INT, " | 1096 "db_create_time INT, " |
1097 "next_id INT default -2, " | 1097 "next_id INT default -2, " |
1098 "cache_guid TEXT )"); | 1098 "cache_guid TEXT )"); |
1099 return db_.Execute(query.c_str()); | 1099 return db_.Execute(query.c_str()); |
1100 } | 1100 } |
1101 } // namespace syncable | 1101 } // namespace syncable |
OLD | NEW |