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

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

Issue 6651014: Applied the IconType. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed the comments Created 9 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/sync/glue/bookmark_change_processor.h" 4 #include "chrome/browser/sync/glue/bookmark_change_processor.h"
5 5
6 #include <stack> 6 #include <stack>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 GURL fake_icon_url = bookmark_node->GetURL(); 532 GURL fake_icon_url = bookmark_node->GetURL();
533 533
534 HistoryService* history = 534 HistoryService* history =
535 profile->GetHistoryService(Profile::EXPLICIT_ACCESS); 535 profile->GetHistoryService(Profile::EXPLICIT_ACCESS);
536 FaviconService* favicon_service = 536 FaviconService* favicon_service =
537 profile->GetFaviconService(Profile::EXPLICIT_ACCESS); 537 profile->GetFaviconService(Profile::EXPLICIT_ACCESS);
538 538
539 history->AddPage(bookmark_node->GetURL(), history::SOURCE_SYNCED); 539 history->AddPage(bookmark_node->GetURL(), history::SOURCE_SYNCED);
540 favicon_service->SetFavicon(bookmark_node->GetURL(), 540 favicon_service->SetFavicon(bookmark_node->GetURL(),
541 fake_icon_url, 541 fake_icon_url,
542 icon_bytes_vector); 542 icon_bytes_vector,
543 history::FAV_ICON);
543 } 544 }
544 545
545 // static 546 // static
546 void BookmarkChangeProcessor::SetSyncNodeFavicon( 547 void BookmarkChangeProcessor::SetSyncNodeFavicon(
547 const BookmarkNode* bookmark_node, 548 const BookmarkNode* bookmark_node,
548 BookmarkModel* model, 549 BookmarkModel* model,
549 sync_api::WriteNode* sync_node) { 550 sync_api::WriteNode* sync_node) {
550 std::vector<unsigned char> favicon_bytes; 551 std::vector<unsigned char> favicon_bytes;
551 EncodeFavicon(bookmark_node, model, &favicon_bytes); 552 EncodeFavicon(bookmark_node, model, &favicon_bytes);
552 if (!favicon_bytes.empty()) 553 if (!favicon_bytes.empty())
553 sync_node->SetFaviconBytes(favicon_bytes); 554 sync_node->SetFaviconBytes(favicon_bytes);
554 } 555 }
555 556
556 } // namespace browser_sync 557 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698