diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-03 10:00:44 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-03 10:00:44 +0000 |
commit | 49aa5a338e8430c8424f6a344abc3b28515c598f (patch) | |
tree | 7cab2f122121ef0fe996e44c4b18bedf1b814370 | |
parent | dca619fdd84f1ec74dfcca0ef18c5abd0fdee3dc (diff) | |
download | chromium_src-49aa5a338e8430c8424f6a344abc3b28515c598f.zip chromium_src-49aa5a338e8430c8424f6a344abc3b28515c598f.tar.gz chromium_src-49aa5a338e8430c8424f6a344abc3b28515c598f.tar.bz2 |
Cleanup: Remove some unused code, or make them platform specific.
Found by Scythe.
Review URL: https://codereview.chromium.org/136113019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248465 0039d316-1c4b-4281-b951-d872f2087c98
14 files changed, 25 insertions, 50 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_controller.cc b/chrome/browser/autocomplete/autocomplete_controller.cc index 35e1ed0..871ab7b 100644 --- a/chrome/browser/autocomplete/autocomplete_controller.cc +++ b/chrome/browser/autocomplete/autocomplete_controller.cc @@ -151,8 +151,6 @@ bool AutocompleteMatchHasCustomDescription(const AutocompleteMatch& match) { } // namespace -const int AutocompleteController::kNoItemSelected = -1; - AutocompleteController::AutocompleteController( Profile* profile, AutocompleteControllerDelegate* delegate, diff --git a/chrome/browser/autocomplete/autocomplete_controller.h b/chrome/browser/autocomplete/autocomplete_controller.h index 3f8839f..26997b6 100644 --- a/chrome/browser/autocomplete/autocomplete_controller.h +++ b/chrome/browser/autocomplete/autocomplete_controller.h @@ -45,9 +45,6 @@ class ZeroSuggestProvider; // matches from a series of providers into one AutocompleteResult. class AutocompleteController : public AutocompleteProviderListener { public: - // Used to indicate an index that is not selected in a call to Update(). - static const int kNoItemSelected; - // |provider_types| is a bitmap containing AutocompleteProvider::Type values // that will (potentially, depending on platform, flags, etc.) be // instantiated. diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h index ec6565f..a995c86 100644 --- a/chrome/browser/autocomplete/search_provider.h +++ b/chrome/browser/autocomplete/search_provider.h @@ -689,10 +689,6 @@ class SearchProvider : public AutocompleteProvider, // session. bool field_trial_triggered_in_session_; - // If true, search history query suggestions will score low enough that - // they will not be inlined. - bool prevent_search_history_inlining_; - GURL current_page_url_; DISALLOW_COPY_AND_ASSIGN(SearchProvider); diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 22b5ee1..5695607 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -162,8 +162,6 @@ BrowserProcessImpl::BrowserProcessImpl( created_safe_browsing_service_(false), module_ref_count_(0), did_start_(false), - checked_for_new_frames_(false), - using_new_frames_(false), render_widget_snapshot_taker_(new RenderWidgetSnapshotTaker), download_status_updater_(new DownloadStatusUpdater), local_state_task_runner_(local_state_task_runner) { diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h index 931b81f..023ee72 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -241,9 +241,6 @@ class BrowserProcessImpl : public BrowserProcess, std::string locale_; - bool checked_for_new_frames_; - bool using_new_frames_; - // This service just sits around and makes snapshots for renderers. It does // nothing in the constructor so we don't have to worry about lazy init. scoped_ptr<RenderWidgetSnapshotTaker> render_widget_snapshot_taker_; diff --git a/chrome/browser/browsing_data/browsing_data_file_system_helper.cc b/chrome/browser/browsing_data/browsing_data_file_system_helper.cc index 62c7ee4..294c179 100644 --- a/chrome/browser/browsing_data/browsing_data_file_system_helper.cc +++ b/chrome/browser/browsing_data/browsing_data_file_system_helper.cc @@ -188,12 +188,10 @@ BrowsingDataFileSystemHelper* BrowsingDataFileSystemHelper::Create( } CannedBrowsingDataFileSystemHelper::CannedBrowsingDataFileSystemHelper( - Profile* profile) - : is_fetching_(false) { + Profile* profile) { } -CannedBrowsingDataFileSystemHelper::CannedBrowsingDataFileSystemHelper() - : is_fetching_(false) { +CannedBrowsingDataFileSystemHelper::CannedBrowsingDataFileSystemHelper() { } CannedBrowsingDataFileSystemHelper::~CannedBrowsingDataFileSystemHelper() {} diff --git a/chrome/browser/browsing_data/browsing_data_file_system_helper.h b/chrome/browser/browsing_data/browsing_data_file_system_helper.h index 9e81157..97e223f 100644 --- a/chrome/browser/browsing_data/browsing_data_file_system_helper.h +++ b/chrome/browser/browsing_data/browsing_data_file_system_helper.h @@ -144,23 +144,13 @@ class CannedBrowsingDataFileSystemHelper CannedBrowsingDataFileSystemHelper(); virtual ~CannedBrowsingDataFileSystemHelper(); - // Holds the current list of filesystems returned to the client. Access to - // |file_system_info_| is triggered indirectly via the UI thread and guarded - // by |is_fetching_|. This means |file_system_info_| is only accessed while - // |is_fetching_| is true. The flag |is_fetching_| is only accessed on the UI - // thread. + // Holds the current list of filesystems returned to the client. std::list<FileSystemInfo> file_system_info_; // The callback passed in at the beginning of the StartFetching workflow so // that it can be triggered via NotifyOnUIThread. base::Callback<void(const std::list<FileSystemInfo>&)> completion_callback_; - // Indicates whether or not we're currently fetching information: set to true - // when StartFetching is called on the UI thread, and reset to false when - // NotifyOnUIThread triggers the success callback. - // This property only mutates on the UI thread. - bool is_fetching_; - DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataFileSystemHelper); }; diff --git a/chrome/browser/captive_portal/captive_portal_detector_unittest.cc b/chrome/browser/captive_portal/captive_portal_detector_unittest.cc index 49bd2b9..babaa89 100644 --- a/chrome/browser/captive_portal/captive_portal_detector_unittest.cc +++ b/chrome/browser/captive_portal/captive_portal_detector_unittest.cc @@ -23,8 +23,7 @@ namespace { class CaptivePortalClient { public: explicit CaptivePortalClient(CaptivePortalDetector* captive_portal_detector) - : captive_portal_detector_(captive_portal_detector), - num_results_received_(0) { + : num_results_received_(0) { } void OnPortalDetectionCompleted( @@ -40,8 +39,6 @@ class CaptivePortalClient { int num_results_received() const { return num_results_received_; } private: - CaptivePortalDetector* captive_portal_detector_; - CaptivePortalDetector::Results results_; int num_results_received_; diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 2645084..95b8f18 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -525,11 +525,19 @@ void InitializeAllPrefHashStores() { } // namespace namespace chrome_browser { + // This error message is not localized because we failed to load the // localization data files. +#if defined(OS_WIN) const char kMissingLocaleDataTitle[] = "Missing File Error"; +#endif + +#if defined(OS_WIN) || defined(TOOLKIT_GTK) +// TODO(port) This should be used on Linux Aura as well. http://crbug.com/338969 const char kMissingLocaleDataMessage[] = "Unable to find locale data files. Please reinstall."; +#endif + } // namespace chrome_browser // BrowserMainParts ------------------------------------------------------------ diff --git a/chrome/browser/chrome_browser_main.h b/chrome/browser/chrome_browser_main.h index 09e652b..8ea91ed 100644 --- a/chrome/browser/chrome_browser_main.h +++ b/chrome/browser/chrome_browser_main.h @@ -31,8 +31,13 @@ class ThreeDAPIObserver; namespace chrome_browser { // For use by ShowMissingLocaleMessageBox. +#if defined(OS_WIN) extern const char kMissingLocaleDataTitle[]; +#endif + +#if defined(OS_WIN) || defined(TOOLKIT_GTK) extern const char kMissingLocaleDataMessage[]; +#endif } namespace chrome_browser_metrics { diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index d0b8619..5217047 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -918,8 +918,7 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch( #if defined(OS_MACOSX) host->AddFilter(new SpellCheckMessageFilterMac(id)); #endif - host->AddFilter(new ChromeNetBenchmarkingMessageFilter( - id, profile, context)); + host->AddFilter(new ChromeNetBenchmarkingMessageFilter(profile, context)); host->AddFilter(new prerender::PrerenderMessageFilter(id, profile)); host->AddFilter(new TtsMessageFilter(id, profile)); #if defined(ENABLE_WEBRTC) @@ -1559,7 +1558,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( switches::kAppsCheckoutURL, switches::kAppsGalleryURL, switches::kCloudPrintServiceURL, - switches::kDebugPrint, switches::kDisableBundledPpapiFlash, switches::kDisableExtensionsResourceWhitelist, switches::kDisablePnacl, diff --git a/chrome/browser/chrome_net_benchmarking_message_filter.cc b/chrome/browser/chrome_net_benchmarking_message_filter.cc index 04bc990..a287a04 100644 --- a/chrome/browser/chrome_net_benchmarking_message_filter.cc +++ b/chrome/browser/chrome_net_benchmarking_message_filter.cc @@ -33,11 +33,9 @@ void ClearCacheCallback(ChromeNetBenchmarkingMessageFilter* filter, } // namespace ChromeNetBenchmarkingMessageFilter::ChromeNetBenchmarkingMessageFilter( - int render_process_id, Profile* profile, net::URLRequestContextGetter* request_context) - : render_process_id_(render_process_id), - profile_(profile), + : profile_(profile), request_context_(request_context) { } diff --git a/chrome/browser/chrome_net_benchmarking_message_filter.h b/chrome/browser/chrome_net_benchmarking_message_filter.h index 04ce7d8..f83a927 100644 --- a/chrome/browser/chrome_net_benchmarking_message_filter.h +++ b/chrome/browser/chrome_net_benchmarking_message_filter.h @@ -19,7 +19,6 @@ class ChromeNetBenchmarkingMessageFilter : public content::BrowserMessageFilter { public: ChromeNetBenchmarkingMessageFilter( - int render_process_id, Profile* profile, net::URLRequestContextGetter* request_context); @@ -41,8 +40,6 @@ class ChromeNetBenchmarkingMessageFilter // Returns true if benchmarking is enabled for chrome. bool CheckBenchmarkingEnabled() const; - int render_process_id_; - // The Profile associated with our renderer process. This should only be // accessed on the UI thread! Profile* profile_; diff --git a/chrome/browser/devtools/devtools_adb_bridge.cc b/chrome/browser/devtools/devtools_adb_bridge.cc index 6fdc7ff..cf25eed 100644 --- a/chrome/browser/devtools/devtools_adb_bridge.cc +++ b/chrome/browser/devtools/devtools_adb_bridge.cc @@ -298,7 +298,7 @@ AdbPagesCommand::AdbPagesCommand( const Callback& callback) : adb_thread_(adb_thread), callback_(callback), - device_providers_(device_providers){ + device_providers_(device_providers) { remote_devices_.reset(new DevToolsAdbBridge::RemoteDevices()); ProcessDeviceProviders(); @@ -730,11 +730,11 @@ DevToolsAdbBridge::Factory::BuildServiceInstanceFor( class AgentHostDelegate : public content::DevToolsExternalAgentProxyDelegate, public AdbWebSocket::Delegate { public: - static void Create(const std::string& id, - scoped_refptr<DevToolsAdbBridge::RemoteBrowser> browser, - const std::string& debug_url, - const std::string& frontend_url, - Profile* profile) { + static void Create(const std::string& id, + scoped_refptr<DevToolsAdbBridge::RemoteBrowser> browser, + const std::string& debug_url, + const std::string& frontend_url, + Profile* profile) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); AgentHostDelegates::iterator it = g_host_delegates.Get().find(id); @@ -758,7 +758,6 @@ class AgentHostDelegate : public content::DevToolsExternalAgentProxyDelegate, Profile* profile) : id_(id), frontend_url_(frontend_url), - adb_message_loop_(adb_message_loop), profile_(profile) { web_socket_ = new AdbWebSocket( device, socket_name, debug_url, adb_message_loop, this); @@ -815,7 +814,6 @@ class AgentHostDelegate : public content::DevToolsExternalAgentProxyDelegate, const std::string id_; const std::string frontend_url_; - base::MessageLoop* adb_message_loop_; Profile* profile_; scoped_ptr<content::DevToolsExternalAgentProxy> proxy_; |