Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chrome/browser/sync/glue/bookmark_change_processor.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/speech/tts_win.cc ('k') | chrome/browser/sync/glue/generic_change_processor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 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"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 DCHECK(bookmark_model_->IsLoaded()); 63 DCHECK(bookmark_model_->IsLoaded());
64 bookmark_model_->AddObserver(this); 64 bookmark_model_->AddObserver(this);
65 } 65 }
66 66
67 void BookmarkChangeProcessor::UpdateSyncNodeProperties( 67 void BookmarkChangeProcessor::UpdateSyncNodeProperties(
68 const BookmarkNode* src, 68 const BookmarkNode* src,
69 BookmarkModel* model, 69 BookmarkModel* model,
70 syncer::WriteNode* dst) { 70 syncer::WriteNode* dst) {
71 // Set the properties of the item. 71 // Set the properties of the item.
72 dst->SetIsFolder(src->is_folder()); 72 dst->SetIsFolder(src->is_folder());
73 dst->SetTitle(UTF16ToWideHack(src->GetTitle())); 73 dst->SetTitle(base::UTF16ToWideHack(src->GetTitle()));
74 sync_pb::BookmarkSpecifics bookmark_specifics(dst->GetBookmarkSpecifics()); 74 sync_pb::BookmarkSpecifics bookmark_specifics(dst->GetBookmarkSpecifics());
75 if (!src->is_folder()) 75 if (!src->is_folder())
76 bookmark_specifics.set_url(src->url().spec()); 76 bookmark_specifics.set_url(src->url().spec());
77 bookmark_specifics.set_creation_time_us(src->date_added().ToInternalValue()); 77 bookmark_specifics.set_creation_time_us(src->date_added().ToInternalValue());
78 dst->SetBookmarkSpecifics(bookmark_specifics); 78 dst->SetBookmarkSpecifics(bookmark_specifics);
79 SetSyncNodeFavicon(src, model, dst); 79 SetSyncNodeFavicon(src, model, dst);
80 } 80 }
81 81
82 // static 82 // static
83 void BookmarkChangeProcessor::EncodeFavicon( 83 void BookmarkChangeProcessor::EncodeFavicon(
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 sync_pb::BookmarkSpecifics updated_specifics( 756 sync_pb::BookmarkSpecifics updated_specifics(
757 sync_node->GetBookmarkSpecifics()); 757 sync_node->GetBookmarkSpecifics());
758 updated_specifics.set_favicon(favicon_bytes->front(), 758 updated_specifics.set_favicon(favicon_bytes->front(),
759 favicon_bytes->size()); 759 favicon_bytes->size());
760 updated_specifics.set_icon_url(bookmark_node->icon_url().spec()); 760 updated_specifics.set_icon_url(bookmark_node->icon_url().spec());
761 sync_node->SetBookmarkSpecifics(updated_specifics); 761 sync_node->SetBookmarkSpecifics(updated_specifics);
762 } 762 }
763 } 763 }
764 764
765 } // namespace browser_sync 765 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/speech/tts_win.cc ('k') | chrome/browser/sync/glue/generic_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698