| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/glue/bookmark_change_processor.h" | 5 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
| 6 | 6 |
| 7 #include <stack> | 7 #include <stack> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "chrome/browser/bookmarks/bookmark_model.h" | 15 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 16 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 16 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 17 #include "chrome/browser/bookmarks/bookmark_utils.h" | 17 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 18 #include "chrome/browser/favicon/favicon_service.h" | 18 #include "chrome/browser/favicon/favicon_service.h" |
| 19 #include "chrome/browser/favicon/favicon_service_factory.h" | 19 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 20 #include "chrome/browser/history/history_service_factory.h" | 20 #include "chrome/browser/history/history_service_factory.h" |
| 21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
| 22 #include "chrome/browser/sync/profile_sync_service.h" | 22 #include "chrome/browser/sync/profile_sync_service.h" |
| 23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 24 #include "sync/internal_api/public/change_record.h" | 24 #include "sync/internal_api/public/change_record.h" |
| 25 #include "sync/internal_api/public/read_node.h" | 25 #include "sync/internal_api/public/read_node.h" |
| 26 #include "sync/internal_api/public/write_node.h" | 26 #include "sync/internal_api/public/write_node.h" |
| 27 #include "sync/internal_api/public/write_transaction.h" | 27 #include "sync/internal_api/public/write_transaction.h" |
| 28 #include "sync/syncable/entry.h" // TODO(tim): Investigating bug 121587. | 28 #include "sync/syncable/entry.h" // TODO(tim): Investigating bug 121587. |
| 29 #include "sync/syncable/write_transaction.h" | 29 #include "sync/syncable/syncable_write_transaction.h" |
| 30 #include "ui/gfx/favicon_size.h" | 30 #include "ui/gfx/favicon_size.h" |
| 31 #include "ui/gfx/image/image_util.h" | 31 #include "ui/gfx/image/image_util.h" |
| 32 | 32 |
| 33 using content::BrowserThread; | 33 using content::BrowserThread; |
| 34 | 34 |
| 35 namespace browser_sync { | 35 namespace browser_sync { |
| 36 | 36 |
| 37 static const char kMobileBookmarksTag[] = "synced_bookmarks"; | 37 static const char kMobileBookmarksTag[] = "synced_bookmarks"; |
| 38 | 38 |
| 39 // Key for sync transaction version in bookmark node meta info. | 39 // Key for sync transaction version in bookmark node meta info. |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 sync_pb::BookmarkSpecifics updated_specifics( | 755 sync_pb::BookmarkSpecifics updated_specifics( |
| 756 sync_node->GetBookmarkSpecifics()); | 756 sync_node->GetBookmarkSpecifics()); |
| 757 updated_specifics.set_favicon(favicon_bytes->front(), | 757 updated_specifics.set_favicon(favicon_bytes->front(), |
| 758 favicon_bytes->size()); | 758 favicon_bytes->size()); |
| 759 updated_specifics.set_icon_url(bookmark_node->icon_url().spec()); | 759 updated_specifics.set_icon_url(bookmark_node->icon_url().spec()); |
| 760 sync_node->SetBookmarkSpecifics(updated_specifics); | 760 sync_node->SetBookmarkSpecifics(updated_specifics); |
| 761 } | 761 } |
| 762 } | 762 } |
| 763 | 763 |
| 764 } // namespace browser_sync | 764 } // namespace browser_sync |
| OLD | NEW |