diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 04:27:19 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 04:27:19 +0000 |
commit | f024f7900b966402d73c9516a9b7e6fe7e98684c (patch) | |
tree | fae561da12e5cbab2df4412c35bd6b75a0a18a06 /chrome | |
parent | 30cb7a44b47b8ec5ef9607ef65dcd6aead29bbe9 (diff) | |
download | chromium_src-f024f7900b966402d73c9516a9b7e6fe7e98684c.zip chromium_src-f024f7900b966402d73c9516a9b7e6fe7e98684c.tar.gz chromium_src-f024f7900b966402d73c9516a9b7e6fe7e98684c.tar.bz2 |
Mac: Some clang appeasing.
BUG=TEST=none
Review URL: http://codereview.chromium.org/3089004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_popup_model.cc | 4 | ||||
-rw-r--r-- | chrome/browser/cocoa/bookmark_bar_controller.h | 2 | ||||
-rw-r--r-- | chrome/browser/cocoa/bookmark_bubble_controller.mm | 1 | ||||
-rw-r--r-- | chrome/browser/cocoa/bookmark_button.h | 6 | ||||
-rw-r--r-- | chrome/browser/cocoa/bookmark_button.mm | 6 | ||||
-rw-r--r-- | chrome/browser/cocoa/fullscreen_controller.h | 4 | ||||
-rw-r--r-- | chrome/browser/cocoa/fullscreen_controller.mm | 4 | ||||
-rw-r--r-- | chrome/browser/cocoa/location_bar/ev_bubble_decoration.mm | 2 | ||||
-rw-r--r-- | chrome/browser/cocoa/popup_blocked_animation_mac.mm | 1 | ||||
-rw-r--r-- | chrome/browser/net/gaia/token_service.cc | 6 | ||||
-rw-r--r-- | chrome/browser/net/gaia/token_service.h | 6 | ||||
-rw-r--r-- | chrome/default_plugin/plugin_impl_gtk.h | 2 | ||||
-rw-r--r-- | chrome/default_plugin/plugin_impl_mac.h | 4 | ||||
-rw-r--r-- | chrome/default_plugin/plugin_impl_win.h | 2 |
14 files changed, 25 insertions, 25 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_model.cc b/chrome/browser/autocomplete/autocomplete_popup_model.cc index eb99c3d..795c03a 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_model.cc +++ b/chrome/browser/autocomplete/autocomplete_popup_model.cc @@ -275,8 +275,8 @@ void AutocompletePopupModel::Observe(NotificationType type, const AutocompleteResult* result = Details<const AutocompleteResult>(details).ptr(); - selected_line_ = (result->default_match() == result->end()) ? - kNoMatch : (result->default_match() - result->begin()); + selected_line_ = result->default_match() == result->end() ? + kNoMatch : static_cast<size_t>(result->default_match() - result->begin()); // There had better not be a nonempty result set with no default match. CHECK((selected_line_ != kNoMatch) || result->empty()); // If we're going to trim the window size to no longer include the hovered diff --git a/chrome/browser/cocoa/bookmark_bar_controller.h b/chrome/browser/cocoa/bookmark_bar_controller.h index ae40517..587cac8 100644 --- a/chrome/browser/cocoa/bookmark_bar_controller.h +++ b/chrome/browser/cocoa/bookmark_bar_controller.h @@ -200,7 +200,7 @@ willAnimateFromState:(bookmarks::VisualState)oldState NSRect originalImportBookmarksRect_; // Original, pre-resized field rect. // "Other bookmarks" button on the right side. - scoped_nsobject<NSButton> otherBookmarksButton_; + scoped_nsobject<BookmarkButton> otherBookmarksButton_; // We have a special menu for folder buttons. This starts as a copy // of the bar menu. diff --git a/chrome/browser/cocoa/bookmark_bubble_controller.mm b/chrome/browser/cocoa/bookmark_bubble_controller.mm index 0884d75..641c37e 100644 --- a/chrome/browser/cocoa/bookmark_bubble_controller.mm +++ b/chrome/browser/cocoa/bookmark_bubble_controller.mm @@ -3,6 +3,7 @@ // found in the LICENSE file. #import "chrome/browser/cocoa/bookmark_bubble_controller.h" + #include "app/l10n_util_mac.h" #include "base/mac_util.h" #include "base/sys_string_conversions.h" diff --git a/chrome/browser/cocoa/bookmark_button.h b/chrome/browser/cocoa/bookmark_button.h index 60dd2a6..3459809 100644 --- a/chrome/browser/cocoa/bookmark_button.h +++ b/chrome/browser/cocoa/bookmark_button.h @@ -215,14 +215,14 @@ class ThemeProvider; namespace bookmark_button { // Notifications for pulsing of bookmarks. -extern const NSString* kPulseBookmarkButtonNotification; +extern NSString* const kPulseBookmarkButtonNotification; // Key for userInfo dict of a kPulseBookmarkButtonNotification. // Value is a [NSValue valueWithPointer:]; pointer is a (const BookmarkNode*). -extern const NSString* kBookmarkKey; +extern NSString* const kBookmarkKey; // Key for userInfo dict of a kPulseBookmarkButtonNotification. // Value is a [NSNumber numberWithBool:] to turn pulsing on or off. -extern const NSString* kBookmarkPulseFlagKey; +extern NSString* const kBookmarkPulseFlagKey; }; diff --git a/chrome/browser/cocoa/bookmark_button.mm b/chrome/browser/cocoa/bookmark_button.mm index f823405..b5f9b86 100644 --- a/chrome/browser/cocoa/bookmark_button.mm +++ b/chrome/browser/cocoa/bookmark_button.mm @@ -16,10 +16,10 @@ static const CGFloat kDragImageOpacity = 0.7; namespace bookmark_button { -const NSString* kPulseBookmarkButtonNotification = +NSString* const kPulseBookmarkButtonNotification = @"PulseBookmarkButtonNotification"; -const NSString* kBookmarkKey = @"BookmarkKey"; -const NSString* kBookmarkPulseFlagKey = @"BookmarkPulseFlagKey"; +NSString* const kBookmarkKey = @"BookmarkKey"; +NSString* const kBookmarkPulseFlagKey = @"BookmarkPulseFlagKey"; }; diff --git a/chrome/browser/cocoa/fullscreen_controller.h b/chrome/browser/cocoa/fullscreen_controller.h index 1e90a62..f213fa3 100644 --- a/chrome/browser/cocoa/fullscreen_controller.h +++ b/chrome/browser/cocoa/fullscreen_controller.h @@ -116,7 +116,7 @@ @end // Notification posted when we're about to enter or leave fullscreen. -extern const NSString* kWillEnterFullscreenNotification; -extern const NSString* kWillLeaveFullscreenNotification; +extern NSString* const kWillEnterFullscreenNotification; +extern NSString* const kWillLeaveFullscreenNotification; #endif // CHROME_BROWSER_COCOA_FULLSCREEN_CONTROLLER_H_ diff --git a/chrome/browser/cocoa/fullscreen_controller.mm b/chrome/browser/cocoa/fullscreen_controller.mm index f5d66bf..452b996 100644 --- a/chrome/browser/cocoa/fullscreen_controller.mm +++ b/chrome/browser/cocoa/fullscreen_controller.mm @@ -9,9 +9,9 @@ #import "chrome/browser/cocoa/browser_window_controller.h" #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" -const NSString* kWillEnterFullscreenNotification = +NSString* const kWillEnterFullscreenNotification = @"WillEnterFullscreenNotification"; -const NSString* kWillLeaveFullscreenNotification = +NSString* const kWillLeaveFullscreenNotification = @"WillLeaveFullscreenNotification"; namespace { diff --git a/chrome/browser/cocoa/location_bar/ev_bubble_decoration.mm b/chrome/browser/cocoa/location_bar/ev_bubble_decoration.mm index 990c4b9..434009a 100644 --- a/chrome/browser/cocoa/location_bar/ev_bubble_decoration.mm +++ b/chrome/browser/cocoa/location_bar/ev_bubble_decoration.mm @@ -31,7 +31,7 @@ const float kMaxBubbleFraction = 0.5; // TODO(shess): This is ugly, find a better way. Using it right now // so that I can crib from gtk and still be able to see that I'm using // the same values easily. -const NSColor* ColorWithRGBBytes(int rr, int gg, int bb) { +NSColor* ColorWithRGBBytes(int rr, int gg, int bb) { DCHECK_LE(rr, 255); DCHECK_LE(bb, 255); DCHECK_LE(gg, 255); diff --git a/chrome/browser/cocoa/popup_blocked_animation_mac.mm b/chrome/browser/cocoa/popup_blocked_animation_mac.mm index d0f5644..44a765b 100644 --- a/chrome/browser/cocoa/popup_blocked_animation_mac.mm +++ b/chrome/browser/cocoa/popup_blocked_animation_mac.mm @@ -108,7 +108,6 @@ class PopupBlockedAnimationObserver : public NotificationObserver { [parentWindow addChildWindow:animation_ ordered:NSWindowAbove]; // Start the animation from the center of the window. - NSRect contentFrame = [[animation_ contentView] frame]; [animation_ setStartFrame:CGRectMake(0, imageHeight / 2, imageWidth, diff --git a/chrome/browser/net/gaia/token_service.cc b/chrome/browser/net/gaia/token_service.cc index 8420fb2..0a87dfe 100644 --- a/chrome/browser/net/gaia/token_service.cc +++ b/chrome/browser/net/gaia/token_service.cc @@ -20,11 +20,11 @@ void TokenService::Initialize( talk_token_fetcher_.reset(new GaiaAuthenticator2(this, source_, getter)); } -const bool TokenService::AreCredentialsValid() const { +bool TokenService::AreCredentialsValid() const { return !credentials_.lsid.empty() && !credentials_.sid.empty(); } -const bool TokenService::HasLsid() const { +bool TokenService::HasLsid() const { return !credentials_.lsid.empty(); } @@ -44,7 +44,7 @@ void TokenService::StartFetchingTokens() { // Services dependent on a token will check if a token is available. // If it isn't, they'll go to sleep until they get a token event. -const bool TokenService::HasTokenForService(const char* const service) const { +bool TokenService::HasTokenForService(const char* const service) const { return token_map_.count(service) > 0; } diff --git a/chrome/browser/net/gaia/token_service.h b/chrome/browser/net/gaia/token_service.h index bad80f5..cf13699 100644 --- a/chrome/browser/net/gaia/token_service.h +++ b/chrome/browser/net/gaia/token_service.h @@ -61,7 +61,7 @@ class TokenService : public GaiaAuthConsumer { // For legacy services with their own auth routines, they can just read // the LSID out directly. Deprecated. - const bool HasLsid() const; + bool HasLsid() const; const std::string& GetLsid() const; // On login, StartFetchingTokens() should be called to kick off token @@ -69,7 +69,7 @@ class TokenService : public GaiaAuthConsumer { // Tokens will be fetched for all services(sync, talk) in the background. // Results come back via event channel. Services can also poll. void StartFetchingTokens(); - const bool HasTokenForService(const char* const service) const; + bool HasTokenForService(const char* const service) const; const std::string& GetTokenForService(const char* const service) const; // Callbacks from the fetchers. @@ -80,7 +80,7 @@ class TokenService : public GaiaAuthConsumer { private: // Did we get a proper LSID? - const bool AreCredentialsValid() const; + bool AreCredentialsValid() const; // Gaia request source for Gaia accounting. std::string source_; diff --git a/chrome/default_plugin/plugin_impl_gtk.h b/chrome/default_plugin/plugin_impl_gtk.h index a699e05..2035384 100644 --- a/chrome/default_plugin/plugin_impl_gtk.h +++ b/chrome/default_plugin/plugin_impl_gtk.h @@ -162,7 +162,7 @@ class PluginInstallerImpl { } // Getter for the NPP instance member. - const NPP instance() const { + NPP instance() const { return instance_; } diff --git a/chrome/default_plugin/plugin_impl_mac.h b/chrome/default_plugin/plugin_impl_mac.h index 6718ee0..267cf9f 100644 --- a/chrome/default_plugin/plugin_impl_mac.h +++ b/chrome/default_plugin/plugin_impl_mac.h @@ -12,7 +12,7 @@ #include "gfx/native_widget_types.h" #include "third_party/npapi/bindings/npapi.h" -#ifdef __OBJ__ +#ifdef __OBJC__ @class NSImage; @class NSString; #else @@ -168,7 +168,7 @@ class PluginInstallerImpl { } // Getter for the NPP instance member. - const NPP instance() const { + NPP instance() const { return instance_; } diff --git a/chrome/default_plugin/plugin_impl_win.h b/chrome/default_plugin/plugin_impl_win.h index 512f9a8..d07207d 100644 --- a/chrome/default_plugin/plugin_impl_win.h +++ b/chrome/default_plugin/plugin_impl_win.h @@ -174,7 +174,7 @@ class PluginInstallerImpl : public gfx::WindowImpl { } // Getter for the NPP instance member. - const NPP instance() const { + NPP instance() const { return instance_; } |