summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-21 21:31:27 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-21 21:31:27 +0000
commit16f76563e2ad664612cb41c1c348f1a1afacd39b (patch)
treece3fc7d8ff1de19266ebdf802f22745568b44ef7 /chrome/browser
parent2c839e74897807ed0727b7e038af6a37a6ac7ec0 (diff)
downloadchromium_src-16f76563e2ad664612cb41c1c348f1a1afacd39b.zip
chromium_src-16f76563e2ad664612cb41c1c348f1a1afacd39b.tar.gz
chromium_src-16f76563e2ad664612cb41c1c348f1a1afacd39b.tar.bz2
Fix a bunch of clang warnings/errors.
BUG=None TEST=None Review URL: http://codereview.chromium.org/3473006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/cocoa/applescript/bookmark_folder_applescript.h7
-rw-r--r--chrome/browser/cocoa/sidebar_controller.mm2
-rw-r--r--chrome/browser/cocoa/tabpose_window.h6
-rw-r--r--chrome/browser/download/download_manager.cc9
-rw-r--r--chrome/browser/net/gaia/token_service.cc6
-rw-r--r--chrome/browser/net/gaia/token_service.h6
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.mm2
-rw-r--r--chrome/browser/spellcheck_host.cc2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc6
-rw-r--r--chrome/browser/web_applications/web_app.cc4
10 files changed, 21 insertions, 29 deletions
diff --git a/chrome/browser/cocoa/applescript/bookmark_folder_applescript.h b/chrome/browser/cocoa/applescript/bookmark_folder_applescript.h
index c8969de..f56a3f9 100644
--- a/chrome/browser/cocoa/applescript/bookmark_folder_applescript.h
+++ b/chrome/browser/cocoa/applescript/bookmark_folder_applescript.h
@@ -9,6 +9,8 @@
#import "chrome/browser/cocoa/applescript/bookmark_node_applescript.h"
+@class BookmarkItemAppleScript;
+
// Represent a bookmark folder scriptable object in applescript.
@interface BookmarkFolderAppleScript : BookmarkNodeAppleScript {
@@ -38,12 +40,13 @@
- (NSArray*)bookmarkItems;
// Inserts a bookmark item at the end.
-- (void)insertInBookmarkItems:(id)aBookmarkItem;
+- (void)insertInBookmarkItems:(BookmarkItemAppleScript*)aBookmarkItem;
// Inserts a bookmark item at some position in the list.
// Called by applescript which takes care of bounds checking, make sure of it
// before calling directly.
-- (void)insertInBookmarkItems:(id)aBookmarkItem atIndex:(int)index;
+- (void)insertInBookmarkItems:(BookmarkItemAppleScript*)aBookmarkItem
+ atIndex:(int)index;
// Removes a bookmarks folder from the list.
// Called by applescript which takes care of bounds checking, make sure of it
diff --git a/chrome/browser/cocoa/sidebar_controller.mm b/chrome/browser/cocoa/sidebar_controller.mm
index c5a0081..b78570e 100644
--- a/chrome/browser/cocoa/sidebar_controller.mm
+++ b/chrome/browser/cocoa/sidebar_controller.mm
@@ -53,7 +53,7 @@ const int kMinWebWidth = 50;
[super dealloc];
}
-- (NSView*)view {
+- (NSSplitView*)view {
return splitView_.get();
}
diff --git a/chrome/browser/cocoa/tabpose_window.h b/chrome/browser/cocoa/tabpose_window.h
index 39958a2..fef3bbb 100644
--- a/chrome/browser/cocoa/tabpose_window.h
+++ b/chrome/browser/cocoa/tabpose_window.h
@@ -59,10 +59,10 @@ class TabStripModelObserverBridge;
// Stores all preview layers. The order in here matches the order in
// the tabstrip model.
- scoped_nsobject<NSArray> allThumbnailLayers_;
+ scoped_nsobject<NSMutableArray> allThumbnailLayers_;
- scoped_nsobject<NSArray> allFaviconLayers_;
- scoped_nsobject<NSArray> allTitleLayers_;
+ scoped_nsobject<NSMutableArray> allFaviconLayers_;
+ scoped_nsobject<NSMutableArray> allTitleLayers_;
// Manages the state of all layers.
scoped_ptr<tabpose::TileSet> tileSet_;
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index c409166..dd35022 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -49,15 +49,6 @@
#include "app/win_util.h"
#endif
-namespace {
-
-// Used to sort download items based on descending start time.
-bool CompareStartTime(DownloadItem* first, DownloadItem* second) {
- return first->start_time() > second->start_time();
-}
-
-} // namespace
-
DownloadManager::DownloadManager()
: shutdown_needed_(false),
profile_(NULL),
diff --git a/chrome/browser/net/gaia/token_service.cc b/chrome/browser/net/gaia/token_service.cc
index 1bf202a..0f2b1ac 100644
--- a/chrome/browser/net/gaia/token_service.cc
+++ b/chrome/browser/net/gaia/token_service.cc
@@ -110,11 +110,11 @@ void TokenService::EraseTokensFromDB() {
web_data_service_->RemoveAllTokens();
}
-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();
}
@@ -134,7 +134,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 006423f..b6f1b3c 100644
--- a/chrome/browser/net/gaia/token_service.h
+++ b/chrome/browser/net/gaia/token_service.h
@@ -115,16 +115,16 @@ 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;
// Did we get a proper LSID?
- const bool AreCredentialsValid() const;
+ bool AreCredentialsValid() const;
// Tokens will be fetched for all services(sync, talk) in the background.
// Results come back via event channel. Services can also poll before events
// are issued.
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;
// For tests only. Doesn't save to the WebDB.
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index bd18a81..b727b81 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -849,7 +849,7 @@ RenderWidgetHostViewMac::AllocateFakePluginWindowHandle(bool opaque,
gfx::PluginWindowHandle handle =
plugin_container_manager_.AllocateFakePluginWindowHandle(opaque, root);
- scoped_nsobject<NSView> plugin_view(
+ scoped_nsobject<AcceleratedPluginView> plugin_view(
[[AcceleratedPluginView alloc] initWithRenderWidgetHostViewMac:this
pluginHandle:handle]);
[plugin_view setHidden:YES];
diff --git a/chrome/browser/spellcheck_host.cc b/chrome/browser/spellcheck_host.cc
index c8ab3ac..5413ce5 100644
--- a/chrome/browser/spellcheck_host.cc
+++ b/chrome/browser/spellcheck_host.cc
@@ -31,11 +31,13 @@ FilePath GetFirstChoiceFilePath(const std::string& language) {
return SpellCheckCommon::GetVersionedFileName(language, dict_dir);
}
+#if defined(OS_WIN)
FilePath GetFallbackFilePath(const FilePath& first_choice) {
FilePath dict_dir;
PathService::Get(chrome::DIR_USER_DATA, &dict_dir);
return dict_dir.Append(first_choice.BaseName());
}
+#endif
} // namespace
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index d40b99d..5edfb32 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1543,12 +1543,6 @@ void TabContents::AddPopup(TabContents* new_contents,
}
}
-namespace {
-bool TransitionIsReload(PageTransition::Type transition) {
- return PageTransition::StripQualifier(transition) == PageTransition::RELOAD;
-}
-}
-
void TabContents::ExpireInfoBars(
const NavigationController::LoadCommittedDetails& details) {
// Only hide InfoBars when the user has done something that makes the main
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc
index ae4bc68..99e004b 100644
--- a/chrome/browser/web_applications/web_app.cc
+++ b/chrome/browser/web_applications/web_app.cc
@@ -111,13 +111,16 @@ FilePath GetWebAppDataDirectory(const FilePath& root_dir,
return root_dir.Append(GetWebAppDir(url));
}
+#if defined(TOOLKIT_VIEWS)
// Predicator for sorting images from largest to smallest.
bool IconPrecedes(
const webkit_glue::WebApplicationInfo::IconInfo& left,
const webkit_glue::WebApplicationInfo::IconInfo& right) {
return left.width < right.width;
}
+#endif
+#if defined(OS_WIN)
// Calculates image checksum using MD5.
void GetImageCheckSum(const SkBitmap& image, MD5Digest* digest) {
DCHECK(digest);
@@ -126,7 +129,6 @@ void GetImageCheckSum(const SkBitmap& image, MD5Digest* digest) {
MD5Sum(image.getPixels(), image.getSize(), digest);
}
-#if defined(OS_WIN)
// Saves |image| as an |icon_file| with the checksum.
bool SaveIconWithCheckSum(const FilePath& icon_file, const SkBitmap& image) {
if (!IconUtil::CreateIconFileFromSkBitmap(image, icon_file))