diff options
Diffstat (limited to 'chrome')
29 files changed, 44 insertions, 41 deletions
diff --git a/chrome/browser/device_orientation/orientation.h b/chrome/browser/device_orientation/orientation.h index 2193170..de876c9 100644 --- a/chrome/browser/device_orientation/orientation.h +++ b/chrome/browser/device_orientation/orientation.h @@ -36,7 +36,7 @@ class Orientation { static Orientation Empty() { return Orientation(); } - bool IsEmpty() { + bool IsEmpty() const { return !can_provide_alpha_ && !can_provide_beta_ && !can_provide_gamma_; } diff --git a/chrome/browser/device_orientation/provider_impl.cc b/chrome/browser/device_orientation/provider_impl.cc index 81ecfa3..e5e2397 100644 --- a/chrome/browser/device_orientation/provider_impl.cc +++ b/chrome/browser/device_orientation/provider_impl.cc @@ -99,7 +99,7 @@ void ProviderImpl::ScheduleInitializePollingThread() { polling_loop->PostTask(FROM_HERE, task); } -void ProviderImpl::DoNotify(Orientation orientation) { +void ProviderImpl::DoNotify(const Orientation& orientation) { DCHECK(MessageLoop::current() == creator_loop_); last_notification_ = orientation; @@ -115,7 +115,7 @@ void ProviderImpl::DoNotify(Orientation orientation) { } } -void ProviderImpl::ScheduleDoNotify(Orientation orientation) { +void ProviderImpl::ScheduleDoNotify(const Orientation& orientation) { DCHECK(MessageLoop::current() == polling_thread_->message_loop()); Task* task = NewRunnableMethod(this, &ProviderImpl::DoNotify, orientation); diff --git a/chrome/browser/device_orientation/provider_impl.h b/chrome/browser/device_orientation/provider_impl.h index d984062..7396035 100644 --- a/chrome/browser/device_orientation/provider_impl.h +++ b/chrome/browser/device_orientation/provider_impl.h @@ -52,8 +52,8 @@ class ProviderImpl : public Provider { // Method for notifying observers of an orientation update. // Runs on the creator_thread_. - void DoNotify(Orientation orientation); - void ScheduleDoNotify(Orientation orientation); + void DoNotify(const Orientation& orientation); + void ScheduleDoNotify(const Orientation& orientation); static bool SignificantlyDifferent(const Orientation& orientation1, const Orientation& orientation2); diff --git a/chrome/browser/extensions/extension_dom_ui.cc b/chrome/browser/extensions/extension_dom_ui.cc index 7ab1cd4..602ad6a 100644 --- a/chrome/browser/extensions/extension_dom_ui.cc +++ b/chrome/browser/extensions/extension_dom_ui.cc @@ -122,7 +122,7 @@ class ExtensionDOMUIImageLoadingTracker : public ImageLoadingTracker::Observer { const char ExtensionDOMUI::kExtensionURLOverrides[] = "extensions.chrome_url_overrides"; -ExtensionDOMUI::ExtensionDOMUI(TabContents* tab_contents, GURL url) +ExtensionDOMUI::ExtensionDOMUI(TabContents* tab_contents, const GURL& url) : DOMUI(tab_contents), url_(url) { ExtensionsService* service = tab_contents->profile()->GetExtensionsService(); diff --git a/chrome/browser/extensions/extension_dom_ui.h b/chrome/browser/extensions/extension_dom_ui.h index 59eae750..ea59b41 100644 --- a/chrome/browser/extensions/extension_dom_ui.h +++ b/chrome/browser/extensions/extension_dom_ui.h @@ -33,7 +33,7 @@ class ExtensionDOMUI public: static const char kExtensionURLOverrides[]; - explicit ExtensionDOMUI(TabContents* tab_contents, GURL url); + explicit ExtensionDOMUI(TabContents* tab_contents, const GURL& url); virtual ~ExtensionDOMUI(); diff --git a/chrome/browser/extensions/extension_updater.h b/chrome/browser/extensions/extension_updater.h index 0fde947..79fa166 100644 --- a/chrome/browser/extensions/extension_updater.h +++ b/chrome/browser/extensions/extension_updater.h @@ -112,7 +112,6 @@ class ManifestFetchesBuilder { const Version& version, PendingExtensionInfo::ExpectedCrxType crx_type, GURL update_url); - ExtensionUpdateService* service_; // List of data on fetches we're going to do. We limit the number of diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 0657e23..4227333 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -190,7 +190,7 @@ class ExtensionsServiceBackend // Check externally updated extensions for updates and install if necessary. // Errors are reported through ExtensionErrorReporter. Succcess is not // reported. - void CheckForExternalUpdates(std::set<std::string> ids_to_ignore, + void CheckForExternalUpdates(const std::set<std::string>& ids_to_ignore, scoped_refptr<ExtensionsService> frontend); // For the extension in |version_path| with |id|, check to see if it's an @@ -351,7 +351,7 @@ void ExtensionsServiceBackend::ReportExtensionLoadError( // check that location for a .crx file, which it will then install locally if // a new version is available. void ExtensionsServiceBackend::CheckForExternalUpdates( - std::set<std::string> ids_to_ignore, + const std::set<std::string>& ids_to_ignore, scoped_refptr<ExtensionsService> frontend) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc index a6b6534..7783a7c 100644 --- a/chrome/browser/importer/firefox2_importer.cc +++ b/chrome/browser/importer/firefox2_importer.cc @@ -50,7 +50,7 @@ Firefox2Importer::Firefox2Importer() : parsing_bookmarks_html_file_(false) { Firefox2Importer::~Firefox2Importer() { } -void Firefox2Importer::StartImport(importer::ProfileInfo profile_info, +void Firefox2Importer::StartImport(const importer::ProfileInfo& profile_info, uint16 items, ImporterBridge* bridge) { bridge_ = bridge; diff --git a/chrome/browser/importer/firefox2_importer.h b/chrome/browser/importer/firefox2_importer.h index 07a5567..5264c556 100644 --- a/chrome/browser/importer/firefox2_importer.h +++ b/chrome/browser/importer/firefox2_importer.h @@ -21,7 +21,7 @@ class Firefox2Importer : public Importer { Firefox2Importer(); // Importer methods. - virtual void StartImport(importer::ProfileInfo profile_info, + virtual void StartImport(const importer::ProfileInfo& profile_info, uint16 items, ImporterBridge* bridge); diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc index 92637d0..6442c87 100644 --- a/chrome/browser/importer/firefox3_importer.cc +++ b/chrome/browser/importer/firefox3_importer.cc @@ -56,7 +56,7 @@ Firefox3Importer::Firefox3Importer() { Firefox3Importer::~Firefox3Importer() { } -void Firefox3Importer::StartImport(importer::ProfileInfo profile_info, +void Firefox3Importer::StartImport(const importer::ProfileInfo& profile_info, uint16 items, ImporterBridge* bridge) { #if defined(OS_LINUX) diff --git a/chrome/browser/importer/firefox3_importer.h b/chrome/browser/importer/firefox3_importer.h index 362f710..fe3deb7 100644 --- a/chrome/browser/importer/firefox3_importer.h +++ b/chrome/browser/importer/firefox3_importer.h @@ -27,7 +27,7 @@ class Firefox3Importer : public Importer { Firefox3Importer(); // Importer methods. - virtual void StartImport(importer::ProfileInfo profile_info, + virtual void StartImport(const importer::ProfileInfo& profile_info, uint16 items, ImporterBridge* bridge); diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc index 7965b462..efa2a0a 100644 --- a/chrome/browser/importer/ie_importer.cc +++ b/chrome/browser/importer/ie_importer.cc @@ -69,7 +69,7 @@ const GUID IEImporter::kPStoreAutocompleteGUID = {0xe161255a, 0x37c3, 0x11d2, const GUID IEImporter::kUnittestGUID = { 0xa79029d6, 0x753e, 0x4e27, {0xb8, 0x7, 0x3d, 0x46, 0xab, 0x15, 0x45, 0xdf}}; -void IEImporter::StartImport(ProfileInfo profile_info, +void IEImporter::StartImport(const ProfileInfo& profile_info, uint16 items, ImporterBridge* bridge) { bridge_ = bridge; diff --git a/chrome/browser/importer/ie_importer.h b/chrome/browser/importer/ie_importer.h index 1acd27b..68b7c23 100644 --- a/chrome/browser/importer/ie_importer.h +++ b/chrome/browser/importer/ie_importer.h @@ -14,7 +14,7 @@ class IEImporter : public Importer { IEImporter() {} // Importer methods. - virtual void StartImport(ProfileInfo browser_info, + virtual void StartImport(const ProfileInfo& browser_info, uint16 items, ImporterBridge* bridge); diff --git a/chrome/browser/importer/importer.h b/chrome/browser/importer/importer.h index 2f034ba..1cb9db7 100644 --- a/chrome/browser/importer/importer.h +++ b/chrome/browser/importer/importer.h @@ -442,7 +442,7 @@ class Importer : public base::RefCountedThreadSafe<Importer> { // Since we do async import, the importer should invoke // ImporterHost::Finished() to notify its host that import // stuff have been finished. - virtual void StartImport(importer::ProfileInfo profile_info, + virtual void StartImport(const importer::ProfileInfo& profile_info, uint16 items, ImporterBridge* bridge) = 0; diff --git a/chrome/browser/importer/safari_importer.h b/chrome/browser/importer/safari_importer.h index e723146..7e234f5 100644 --- a/chrome/browser/importer/safari_importer.h +++ b/chrome/browser/importer/safari_importer.h @@ -33,7 +33,7 @@ class SafariImporter : public Importer { explicit SafariImporter(const FilePath& library_dir); // Importer methods. - virtual void StartImport(importer::ProfileInfo profile_info, + virtual void StartImport(const importer::ProfileInfo& profile_info, uint16 items, ImporterBridge* bridge); diff --git a/chrome/browser/importer/safari_importer.mm b/chrome/browser/importer/safari_importer.mm index 3ff4676..de40655 100644 --- a/chrome/browser/importer/safari_importer.mm +++ b/chrome/browser/importer/safari_importer.mm @@ -76,7 +76,7 @@ bool SafariImporter::CanImport(const FilePath& library_dir, return *services_supported != importer::NONE; } -void SafariImporter::StartImport(importer::ProfileInfo profile_info, +void SafariImporter::StartImport(const importer::ProfileInfo& profile_info, uint16 services_supported, ImporterBridge* bridge) { bridge_ = bridge; diff --git a/chrome/browser/importer/toolbar_importer.cc b/chrome/browser/importer/toolbar_importer.cc index 0aabcc6..da367f8 100644 --- a/chrome/browser/importer/toolbar_importer.cc +++ b/chrome/browser/importer/toolbar_importer.cc @@ -99,7 +99,7 @@ Toolbar5Importer::~Toolbar5Importer() { DCHECK(!data_fetcher_); } -void Toolbar5Importer::StartImport(importer::ProfileInfo profile_info, +void Toolbar5Importer::StartImport(const importer::ProfileInfo& profile_info, uint16 items, ImporterBridge* bridge) { DCHECK(bridge); diff --git a/chrome/browser/importer/toolbar_importer.h b/chrome/browser/importer/toolbar_importer.h index 1def25d..f83135a 100644 --- a/chrome/browser/importer/toolbar_importer.h +++ b/chrome/browser/importer/toolbar_importer.h @@ -42,7 +42,7 @@ class Toolbar5Importer : public URLFetcher::Delegate, public Importer { // should only either be NONE or FAVORITES, since as of right now these are // the only items this importer supports. This method provides implementation // of Importer::StartImport. - virtual void StartImport(importer::ProfileInfo profile_info, + virtual void StartImport(const importer::ProfileInfo& profile_info, uint16 items, ImporterBridge* bridge); diff --git a/chrome/browser/net/chrome_cookie_notification_details.h b/chrome/browser/net/chrome_cookie_notification_details.h index 42542b0..57df427 100644 --- a/chrome/browser/net/chrome_cookie_notification_details.h +++ b/chrome/browser/net/chrome_cookie_notification_details.h @@ -10,13 +10,13 @@ struct ChromeCookieDetails { public: - ChromeCookieDetails(net::CookieMonster::CanonicalCookie* cookie_copy, + ChromeCookieDetails(const net::CookieMonster::CanonicalCookie* cookie_copy, bool is_removed) : cookie(cookie_copy), removed(is_removed) { } - net::CookieMonster::CanonicalCookie* cookie; + const net::CookieMonster::CanonicalCookie* cookie; bool removed; }; diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index e73e375..732dc37 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -208,7 +208,7 @@ class ChromeCookieMonsterDelegate : public net::CookieMonster::Delegate { virtual ~ChromeCookieMonsterDelegate() {} void OnCookieChangedAsyncHelper( - net::CookieMonster::CanonicalCookie cookie, + const net::CookieMonster::CanonicalCookie& cookie, bool removed) { if (profile_getter_->get()) { ChromeCookieDetails cookie_details(&cookie, removed); diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 62998e0..fc8cc12 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -1145,7 +1145,7 @@ void ResourceMessageFilter::OnResourceTypeStats( } void ResourceMessageFilter::OnResourceTypeStatsOnUIThread( - WebCache::ResourceTypeStats stats, base::ProcessId renderer_id) { + const WebCache::ResourceTypeStats& stats, base::ProcessId renderer_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); TaskManager::GetInstance()->model()->NotifyResourceTypeStats( renderer_id, stats); diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index bd20764..850306e 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -284,8 +284,9 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, #endif void OnResourceTypeStats(const WebKit::WebCache::ResourceTypeStats& stats); - static void OnResourceTypeStatsOnUIThread(WebKit::WebCache::ResourceTypeStats, - base::ProcessId renderer_id); + static void OnResourceTypeStatsOnUIThread( + const WebKit::WebCache::ResourceTypeStats&, + base::ProcessId renderer_id); void OnV8HeapStats(int v8_memory_allocated, int v8_memory_used); static void OnV8HeapStatsOnUIThread(int v8_memory_allocated, diff --git a/chrome/browser/safe_browsing/safe_browsing_store.h b/chrome/browser/safe_browsing/safe_browsing_store.h index b6b44bd..418c55f 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store.h +++ b/chrome/browser/safe_browsing/safe_browsing_store.h @@ -69,7 +69,7 @@ struct SBAddFullHash { int32 received; SBFullHash full_hash; - SBAddFullHash(int32 id, base::Time r, SBFullHash h) + SBAddFullHash(int32 id, base::Time r, const SBFullHash& h) : chunk_id(id), received(static_cast<int32>(r.ToTimeT())), full_hash(h) { @@ -77,7 +77,7 @@ struct SBAddFullHash { // Provided for ReadAddHashes() implementations, which already have // an int32 for the time. - SBAddFullHash(int32 id, int32 r, SBFullHash h) + SBAddFullHash(int32 id, int32 r, const SBFullHash& h) : chunk_id(id), received(r), full_hash(h) {} SBAddFullHash() : chunk_id(), received(), full_hash() {} @@ -91,7 +91,7 @@ struct SBSubFullHash { int32 add_chunk_id; SBFullHash full_hash; - SBSubFullHash(int32 id, int32 add_id, SBFullHash h) + SBSubFullHash(int32 id, int32 add_id, const SBFullHash& h) : chunk_id(id), add_chunk_id(add_id), full_hash(h) {} SBSubFullHash() : chunk_id(), add_chunk_id(), full_hash() {} @@ -182,11 +182,12 @@ class SafeBrowsingStore { virtual bool WriteAddPrefix(int32 chunk_id, SBPrefix prefix) = 0; virtual bool WriteAddHash(int32 chunk_id, - base::Time receive_time, SBFullHash full_hash) = 0; + base::Time receive_time, + const SBFullHash& full_hash) = 0; virtual bool WriteSubPrefix(int32 chunk_id, int32 add_chunk_id, SBPrefix prefix) = 0; virtual bool WriteSubHash(int32 chunk_id, int32 add_chunk_id, - SBFullHash full_hash) = 0; + const SBFullHash& full_hash) = 0; // Collect the chunk data and preferrably store it on disk to // release memory. Shoul not modify the data in-place. diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.cc b/chrome/browser/safe_browsing/safe_browsing_store_file.cc index 196cf0d..71f415f 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store_file.cc +++ b/chrome/browser/safe_browsing/safe_browsing_store_file.cc @@ -239,7 +239,7 @@ bool SafeBrowsingStoreFile::WriteAddPrefix(int32 chunk_id, SBPrefix prefix) { bool SafeBrowsingStoreFile::WriteAddHash(int32 chunk_id, base::Time receive_time, - SBFullHash full_hash) { + const SBFullHash& full_hash) { add_hashes_.push_back(SBAddFullHash(chunk_id, receive_time, full_hash)); return true; } @@ -252,7 +252,7 @@ bool SafeBrowsingStoreFile::WriteSubPrefix(int32 chunk_id, } bool SafeBrowsingStoreFile::WriteSubHash(int32 chunk_id, int32 add_chunk_id, - SBFullHash full_hash) { + const SBFullHash& full_hash) { sub_hashes_.push_back(SBSubFullHash(chunk_id, add_chunk_id, full_hash)); return true; } diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.h b/chrome/browser/safe_browsing/safe_browsing_store_file.h index cd0cee2..5ddc87a 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store_file.h +++ b/chrome/browser/safe_browsing/safe_browsing_store_file.h @@ -127,11 +127,12 @@ class SafeBrowsingStoreFile : public SafeBrowsingStore { virtual bool BeginChunk(); virtual bool WriteAddPrefix(int32 chunk_id, SBPrefix prefix); virtual bool WriteAddHash(int32 chunk_id, - base::Time receive_time, SBFullHash full_hash); + base::Time receive_time, + const SBFullHash& full_hash); virtual bool WriteSubPrefix(int32 chunk_id, int32 add_chunk_id, SBPrefix prefix); virtual bool WriteSubHash(int32 chunk_id, int32 add_chunk_id, - SBFullHash full_hash); + const SBFullHash& full_hash); virtual bool FinishChunk(); virtual bool BeginUpdate(); diff --git a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h index 6f684c1d..60e7fda 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h +++ b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h @@ -37,7 +37,8 @@ class SafeBrowsingStoreSqlite : public SafeBrowsingStore { return WriteAddPrefixes(prefixes); } virtual bool WriteAddHash(int32 chunk_id, - base::Time receive_time, SBFullHash full_hash) { + base::Time receive_time, + const SBFullHash& full_hash) { const std::vector<SBAddFullHash> hashes(1, SBAddFullHash(chunk_id, receive_time, full_hash)); return WriteAddHashes(hashes); @@ -49,7 +50,7 @@ class SafeBrowsingStoreSqlite : public SafeBrowsingStore { return WriteSubPrefixes(prefixes); } virtual bool WriteSubHash(int32 chunk_id, int32 add_chunk_id, - SBFullHash full_hash) { + const SBFullHash& full_hash) { const std::vector<SBSubFullHash> hashes(1, SBSubFullHash(chunk_id, add_chunk_id, full_hash)); return WriteSubHashes(hashes); diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc index 68ca49b..15ff1ca 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc @@ -35,7 +35,7 @@ RenderViewHostDelegateViewHelper::MaybeCreateBackgroundContents( int route_id, Profile* profile, SiteInstance* site, - GURL opener_url, + const GURL& opener_url, const string16& frame_name) { ExtensionsService* extensions_service = profile->GetExtensionsService(); diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.h b/chrome/browser/tab_contents/render_view_host_delegate_helper.h index 5afe3c7..372b234 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h @@ -76,7 +76,7 @@ class RenderViewHostDelegateViewHelper { int route_id, Profile* profile, SiteInstance* site, - GURL opener_url, + const GURL& opener_url, const string16& frame_name); // Tracks created RenderViewHost objects that have not been shown yet. diff --git a/chrome/browser/worker_host/worker_document_set.h b/chrome/browser/worker_host/worker_document_set.h index a73a9c9..7894fc4 100644 --- a/chrome/browser/worker_host/worker_document_set.h +++ b/chrome/browser/worker_host/worker_document_set.h @@ -32,7 +32,7 @@ class WorkerDocumentSet : public base::RefCounted<WorkerDocumentSet> { // Define operator "<", which is used to determine uniqueness within // the set. - bool operator <(DocumentInfo other) const { + bool operator <(const DocumentInfo& other) const { // Items are identical if the sender and document_id are identical, // otherwise create an arbitrary stable ordering based on the document // id/sender. |