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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 199763002: Verify FormatType in ScopedClipboardWriter::WritePickledData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Linux GTK Created 6 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) 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/ui/views/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 canvas->FillRect(indicator_bounds, kDropIndicatorColor); 778 canvas->FillRect(indicator_bounds, kDropIndicatorColor);
779 } 779 }
780 } 780 }
781 781
782 bool BookmarkBarView::GetDropFormats( 782 bool BookmarkBarView::GetDropFormats(
783 int* formats, 783 int* formats,
784 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { 784 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) {
785 if (!model_ || !model_->loaded()) 785 if (!model_ || !model_->loaded())
786 return false; 786 return false;
787 *formats = ui::OSExchangeData::URL; 787 *formats = ui::OSExchangeData::URL;
788 custom_formats->insert(BookmarkNodeData::GetBookmarkCustomFormat()); 788 custom_formats->insert(BookmarkNodeData::GetFormatType());
789 return true; 789 return true;
790 } 790 }
791 791
792 bool BookmarkBarView::AreDropTypesRequired() { 792 bool BookmarkBarView::AreDropTypesRequired() {
793 return true; 793 return true;
794 } 794 }
795 795
796 bool BookmarkBarView::CanDrop(const ui::OSExchangeData& data) { 796 bool BookmarkBarView::CanDrop(const ui::OSExchangeData& data) {
797 if (!model_ || !model_->loaded() || 797 if (!model_ || !model_->loaded() ||
798 !browser_->profile()->GetPrefs()->GetBoolean( 798 !browser_->profile()->GetPrefs()->GetBoolean(
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 DCHECK(apps_page_shortcut_); 1855 DCHECK(apps_page_shortcut_);
1856 // Only perform layout if required. 1856 // Only perform layout if required.
1857 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( 1857 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar(
1858 browser_->profile(), browser_->host_desktop_type()); 1858 browser_->profile(), browser_->host_desktop_type());
1859 if (apps_page_shortcut_->visible() == visible) 1859 if (apps_page_shortcut_->visible() == visible)
1860 return; 1860 return;
1861 apps_page_shortcut_->SetVisible(visible); 1861 apps_page_shortcut_->SetVisible(visible);
1862 UpdateBookmarksSeparatorVisibility(); 1862 UpdateBookmarksSeparatorVisibility();
1863 Layout(); 1863 Layout();
1864 } 1864 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_node_data_views.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698