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

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

Issue 6544023: Fix crashes in ExtensionService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment/TODO Created 9 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/ui/gtk/bookmark_bar_gtk.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4
5 #include "chrome/browser/ui/views/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return views::MenuButton::OnMousePressed(e); 228 return views::MenuButton::OnMousePressed(e);
229 } 229 }
230 230
231 private: 231 private:
232 BookmarkBarView* owner_; 232 BookmarkBarView* owner_;
233 233
234 DISALLOW_COPY_AND_ASSIGN(OverFlowButton); 234 DISALLOW_COPY_AND_ASSIGN(OverFlowButton);
235 }; 235 };
236 236
237 void RecordAppLaunch(Profile* profile, GURL url) { 237 void RecordAppLaunch(Profile* profile, GURL url) {
238 if (!profile->GetExtensionService()->IsInstalledApp(url)) 238 // TODO: the ExtensionService should never be NULL, but in some cases it is,
239 // see bug 73768. After it is resolved, the explicit test can go away.
240 ExtensionService* service = profile->GetExtensionService();
241 if (!service || !service->IsInstalledApp(url))
239 return; 242 return;
240 243
241 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, 244 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram,
242 extension_misc::APP_LAUNCH_BOOKMARK_BAR, 245 extension_misc::APP_LAUNCH_BOOKMARK_BAR,
243 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); 246 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
244 } 247 }
245 248
246 } // namespace 249 } // namespace
247 250
248 // DropInfo ------------------------------------------------------------------- 251 // DropInfo -------------------------------------------------------------------
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 // The tooltip is the only way we have to display text explaining the error 1763 // The tooltip is the only way we have to display text explaining the error
1761 // to the user. 1764 // to the user.
1762 sync_error_button->SetTooltipText( 1765 sync_error_button->SetTooltipText(
1763 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC))); 1766 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC)));
1764 sync_error_button->SetAccessibleName( 1767 sync_error_button->SetAccessibleName(
1765 l10n_util::GetStringUTF16(IDS_ACCNAME_SYNC_ERROR_BUTTON)); 1768 l10n_util::GetStringUTF16(IDS_ACCNAME_SYNC_ERROR_BUTTON));
1766 sync_error_button->SetIcon( 1769 sync_error_button->SetIcon(
1767 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); 1770 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING));
1768 return sync_error_button; 1771 return sync_error_button;
1769 } 1772 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/bookmark_bar_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698