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

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: sync 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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 GURL fake_icon_url = bookmark_node->GetURL(); 534 GURL fake_icon_url = bookmark_node->GetURL();
535 535
536 HistoryService* history = 536 HistoryService* history =
537 profile->GetHistoryService(Profile::EXPLICIT_ACCESS); 537 profile->GetHistoryService(Profile::EXPLICIT_ACCESS);
538 FaviconService* favicon_service = 538 FaviconService* favicon_service =
539 profile->GetFaviconService(Profile::EXPLICIT_ACCESS); 539 profile->GetFaviconService(Profile::EXPLICIT_ACCESS);
540 540
541 history->AddPage(bookmark_node->GetURL(), history::SOURCE_SYNCED); 541 history->AddPage(bookmark_node->GetURL(), history::SOURCE_SYNCED);
542 favicon_service->SetFavicon(bookmark_node->GetURL(), 542 favicon_service->SetFavicon(bookmark_node->GetURL(),
543 fake_icon_url, 543 fake_icon_url,
544 icon_bytes_vector); 544 icon_bytes_vector,
545 history::FAVICON);
545 } 546 }
546 547
547 // static 548 // static
548 void BookmarkChangeProcessor::SetSyncNodeFavicon( 549 void BookmarkChangeProcessor::SetSyncNodeFavicon(
549 const BookmarkNode* bookmark_node, 550 const BookmarkNode* bookmark_node,
550 BookmarkModel* model, 551 BookmarkModel* model,
551 sync_api::WriteNode* sync_node) { 552 sync_api::WriteNode* sync_node) {
552 std::vector<unsigned char> favicon_bytes; 553 std::vector<unsigned char> favicon_bytes;
553 EncodeFavicon(bookmark_node, model, &favicon_bytes); 554 EncodeFavicon(bookmark_node, model, &favicon_bytes);
554 if (!favicon_bytes.empty()) 555 if (!favicon_bytes.empty())
555 sync_node->SetFaviconBytes(favicon_bytes); 556 sync_node->SetFaviconBytes(favicon_bytes);
556 } 557 }
557 558
558 } // namespace browser_sync 559 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698