Skip to content

Commit

Permalink
Clean up a few more unused globals.
Browse files Browse the repository at this point in the history
Found by clang's new -Wunused-const-variable.

BUG=290204
R=akalin@chromium.org, avi@chromium.org, isherman@chromium.org, jamesr@chromium.org, joi@chromium.org, sergeyu@chromium.org, sky@chromium.org, thestig@chromium.org, xhwang@chromium.org

Review URL: https://codereview.chromium.org/24649002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225273 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
thakis@chromium.org committed Sep 25, 2013
1 parent d0e6d8e commit 9afc14e
Show file tree
Hide file tree
Showing 126 changed files with 260 additions and 645 deletions.
7 changes: 0 additions & 7 deletions cc/trees/thread_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_impl.h"

namespace {

// Measured in seconds.
const double kContextRecreationTickRate = 0.03;

// Measured in seconds.
const double kSmoothnessTakesPriorityExpirationDelay = 0.25;

Expand All @@ -35,8 +30,6 @@ const double kCommitAndActivationDurationEstimationPercentile = 50.0;
const double kDrawDurationEstimationPercentile = 100.0;
const int kDrawDurationEstimatePaddingInMicroseconds = 0;

} // namespace

namespace cc {

struct ThreadProxy::ReadbackRequest {
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ const Experiment::Choice kSimpleCacheBackendChoices[] = {
switches::kUseSimpleCacheBackend, "on"}
};

#if defined(USE_AURA)
const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
{ IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
{ IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
Expand All @@ -299,6 +300,7 @@ const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
{ IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
switches::kTabCaptureDownscaleQuality, "best" },
};
#endif

const Experiment::Choice kMapImageChoices[] = {
{ IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
Expand Down
7 changes: 0 additions & 7 deletions chrome/browser/chrome_browser_main_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@

namespace {

// This preference is used to track whether the KeychainReauthorize operation
// has occurred at launch. This operation only makes sense while the
// application continues to be signed by the old certificate.
NSString* const kKeychainReauthorizeAtLaunchPref =
@"KeychainReauthorizeInAppMay2012";
const int kKeychainReauthorizeAtLaunchMaxTries = 2;

// Some users rarely restart Chrome, so they might never get a chance to run
// the at-launch KeychainReauthorize. To account for them, there's also an
// at-update KeychainReauthorize option, which runs from .keystone_install for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ const char kSwitchFastUpdate[] = "fast-update";
const char kSwitchOutOfProcess[] = "out-of-process";
// Add "testrequest=1" parameter to the update check query.
const char kSwitchRequestParam[] = "test-request";
// Disables differential updates.
const char kSwitchDisableDeltaUpdates[] = "disable-delta-updates";
// Disables pings. Pings are the requests sent to the update server that report
// the success or the failure of component install or update attempts.
extern const char kSwitchDisablePings[] = "disable-pings";
Expand All @@ -52,6 +50,11 @@ const char kDefaultUrlSource[] =
// The url to send the pings to.
const char kPingUrl[] = "http://tools.google.com/service/update2";

#if defined(OS_WIN)
// Disables differential updates.
const char kSwitchDisableDeltaUpdates[] = "disable-delta-updates";
#endif // defined(OS_WIN)

// Returns true if and only if |test| is contained in |vec|.
bool HasSwitchValue(const std::vector<std::string>& vec, const char* test) {
if (vec.empty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,20 @@ using content::PluginService;

namespace {

// File name of the Pepper Flash component manifest on different platforms.
const char kPepperFlashManifestName[] = "Flapper";

#if defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX)
// CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb.
const uint8 kSha2Hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20,
0xac, 0xd3, 0x7e, 0x86, 0x8c, 0x86, 0x2c, 0x11,
0xb9, 0x40, 0xc5, 0x55, 0xaf, 0x08, 0x63, 0x70,
0x54, 0xf9, 0x56, 0xd3, 0xe7, 0x88, 0xba, 0x8c};

// File name of the Pepper Flash component manifest on different platforms.
const char kPepperFlashManifestName[] = "Flapper";
// If we don't have a Pepper Flash component, this is the version we claim.
const char kNullVersion[] = "0.0.0.0";

#endif // defined(GOOGLE_CHROME_BUILD) && !defined(OS_LINUX)

// Name of the Pepper Flash OS in the component manifest.
const char kPepperFlashOperatingSystem[] =
Expand All @@ -74,9 +80,6 @@ const char kPepperFlashArch[] =
"???";
#endif

// If we don't have a Pepper Flash component, this is the version we claim.
const char kNullVersion[] = "0.0.0.0";

// The base directory on Windows looks like:
// <profile>\AppData\Local\Google\Chrome\User Data\PepperFlash\.
base::FilePath GetPepperFlashBaseDirectory() {
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/devtools/adb_client_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
namespace {

const int kBufferSize = 16 * 1024;
const int kResponseBufferSize = 16;
const char kOkayResponse[] = "OKAY";
const char kHostTransportCommand[] = "host:transport:%s";
const char kLocalhost[] = "127.0.0.1";
Expand Down
43 changes: 23 additions & 20 deletions chrome/browser/devtools/devtools_adb_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,34 @@ using content::BrowserThread;

namespace {

static const char kDevToolsAdbBridgeThreadName[] = "Chrome_DevToolsADBThread";
static const char kHostDevicesCommand[] = "host:devices";
static const char kHostTransportCommand[] = "host:transport:%s|%s";
static const char kLocalAbstractCommand[] = "localabstract:%s";
static const char kDeviceModelCommand[] = "shell:getprop ro.product.model";
static const char kLocalChrome[] = "Local Chrome";
static const char kChrome[] = "Chrome";
static const char kOpenedUnixSocketsCommand[] = "shell:cat /proc/net/unix";
static const char kListProcessesCommand[] = "shell:ps";
static const char kDumpsysCommand[] = "shell:dumpsys window policy";
static const char kDumpsysScreenSizePrefix[] = "mStable=";

static const char kPageListRequest[] = "GET /json HTTP/1.1\r\n\r\n";
static const char kVersionRequest[] = "GET /json/version HTTP/1.1\r\n\r\n";
static const char kClosePageRequest[] = "GET /json/close/%s HTTP/1.1\r\n\r\n";
static const char kNewPageRequest[] = "GET /json/new HTTP/1.1\r\n\r\n";
static const char kActivatePageRequest[] =
const char kDevToolsAdbBridgeThreadName[] = "Chrome_DevToolsADBThread";
const char kHostDevicesCommand[] = "host:devices";
const char kHostTransportCommand[] = "host:transport:%s|%s";
const char kLocalAbstractCommand[] = "localabstract:%s";
const char kDeviceModelCommand[] = "shell:getprop ro.product.model";
const char kOpenedUnixSocketsCommand[] = "shell:cat /proc/net/unix";
const char kListProcessesCommand[] = "shell:ps";
const char kDumpsysCommand[] = "shell:dumpsys window policy";
const char kDumpsysScreenSizePrefix[] = "mStable=";

const char kPageListRequest[] = "GET /json HTTP/1.1\r\n\r\n";
const char kVersionRequest[] = "GET /json/version HTTP/1.1\r\n\r\n";
const char kClosePageRequest[] = "GET /json/close/%s HTTP/1.1\r\n\r\n";
const char kNewPageRequest[] = "GET /json/new HTTP/1.1\r\n\r\n";
const char kActivatePageRequest[] =
"GET /json/activate/%s HTTP/1.1\r\n\r\n";
const int kAdbPort = 5037;
const int kBufferSize = 16 * 1024;
const int kAdbPollingIntervalMs = 1000;

static const char kUrlParam[] = "url";
static const char kPageReloadCommand[] = "Page.reload";
static const char kPageNavigateCommand[] = "Page.navigate";
const char kUrlParam[] = "url";
const char kPageReloadCommand[] = "Page.reload";
const char kPageNavigateCommand[] = "Page.navigate";

#if defined(DEBUG_DEVTOOLS)
const char kChrome[] = "Chrome";
const char kLocalChrome[] = "Local Chrome";
#endif // defined(DEBUG_DEVTOOLS)

typedef DevToolsAdbBridge::Callback Callback;
typedef std::vector<scoped_refptr<DevToolsAdbBridge::AndroidDevice> >
Expand Down
3 changes: 0 additions & 3 deletions chrome/browser/drive/drive_api_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ namespace {
// Google Apps MIME types:
const char kGoogleDocumentMimeType[] = "application/vnd.google-apps.document";
const char kGoogleDrawingMimeType[] = "application/vnd.google-apps.drawing";
const char kGoogleFormMimeType[] = "application/vnd.google-apps.form";
const char kGooglePresentationMimeType[] =
"application/vnd.google-apps.presentation";
const char kGoogleScriptMimeType[] = "application/vnd.google-apps.script";
const char kGoogleSiteMimeType[] = "application/vnd.google-apps.site";
const char kGoogleSpreadsheetMimeType[] =
"application/vnd.google-apps.spreadsheet";
const char kGoogleTableMimeType[] = "application/vnd.google-apps.table";
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ const char kFailedToConnect[] = "Connection failed";
const char kInvalidDevice[] = "Invalid device";
const char kInvalidUuid[] = "Invalid UUID";
const char kPermissionDenied[] = "Permission to add profile denied.";
const char kPlatformNotSupported[] =
"This operation is not supported on your platform";
const char kProfileAlreadyRegistered[] =
"This profile has already been registered";
const char kProfileNotFound[] = "Profile not found: invalid uuid";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ namespace extensions {

namespace {
// Error messages.
const char kUnknownConditionAttribute[] = "Unknown matching condition: '*'";
const char kInvalidValue[] = "Condition '*' has an invalid value";

struct WebRequestConditionAttributeFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ namespace extensions {

namespace {

const char kNotImplementedError[] =
"Desktop Capture API is not yet implemented for this platform.";
const char kInvalidSourceNameError[] = "Invalid source type specified.";
const char kEmptySourcesListError[] =
"At least one source type must be specified.";
Expand Down Expand Up @@ -101,6 +99,8 @@ bool DesktopCaptureChooseDesktopMediaFunction::RunImpl() {
screen_capturer.Pass(), window_capturer.Pass()));
picker_ = DesktopMediaPicker::Create();
#else
const char kNotImplementedError[] =
"Desktop Capture API is not yet implemented for this platform.";
error_ = kNotImplementedError;
return false;
#endif
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/api/history/history_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ namespace Search = api::history::Search;

namespace {

const char kInvalidIdError[] = "History item id is invalid.";
const char kInvalidUrlError[] = "Url is invalid.";
const char kDeleteProhibitedError[] = "Browsing history is not allowed to be "
"deleted.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const char kImageBurnerError[] = "Error contacting Image Burner process.";
const char kImageMD5[] = "Failed to calculate MD5 sum for unzipped image.";
const char kImageNotFound[] = "Unpacked image not found.";
const char kImageSize[] = "Could not determine image size.";
const char kInvalidFileEntry[] = "Invalid file entry.";
const char kInvalidUrl[] = "Invalid URL provided.";
const char kMultiFileZip[] = "More than one file in zip."
" Unsure how to proceed.";
Expand Down
6 changes: 2 additions & 4 deletions chrome/browser/extensions/api/messaging/message_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ using content::WebContents;

namespace extensions {

namespace {
const char kReceivingEndDoesntExistError[] =
"Could not establish connection. Receiving end does not exist.";
const char kMissingPermissionError[] =
"Access to native messaging requires nativeMessaging permission.";
const char kNativeMessagingNotSupportedError[] =
"Native Messaging is not supported on this platform.";
}

struct MessageService::MessageChannel {
scoped_ptr<MessagePort> opener;
Expand Down Expand Up @@ -358,6 +354,8 @@ void MessageService::OpenChannelToNativeApp(

AddChannel(channel.release(), receiver_port_id);
#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX))
const char kNativeMessagingNotSupportedError[] =
"Native Messaging is not supported on this platform.";
DispatchOnDisconnect(
source, receiver_port_id, kNativeMessagingNotSupportedError);
#endif // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ namespace extensions {

namespace {

#if defined(OS_WIN)
// Name of the command line switch used to pass handle of the native view to
// the native messaging host.
const char kParentWindowSwitchName[] = "parent-window";
#endif // defined(OS_WIN)

base::FilePath GetHostManifestPathFromCommandLine(
const std::string& native_host_name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ namespace notifications = api::notifications;

namespace {

const char kResultKey[] = "result";
const char kMissingRequiredPropertiesForCreateNotification[] =
"Some of the required properties are missing: type, iconUrl, title and "
"message.";
Expand Down
6 changes: 0 additions & 6 deletions chrome/browser/extensions/api/omnibox/omnibox_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ namespace SetDefaultSuggestion = omnibox::SetDefaultSuggestion;
namespace {

const char kSuggestionContent[] = "content";
const char kSuggestionDescription[] = "description";
const char kSuggestionDescriptionStyles[] = "descriptionStyles";
const char kSuggestionDescriptionStylesRaw[] = "descriptionStylesRaw";
const char kDescriptionStylesType[] = "type";
const char kDescriptionStylesOffset[] = "offset";
const char kDescriptionStylesLength[] = "length";
const char kCurrentTabDisposition[] = "currentTab";
const char kForegroundTabDisposition[] = "newForegroundTab";
const char kBackgroundTabDisposition[] = "newBackgroundTab";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,11 @@

using content::BrowserThread;

namespace {
const char kChannelIdSeparator[] = "/";
const char kUserNotSignedIn[] = "The user is not signed in.";
const char kUserAccessTokenFailure[] =
"Cannot obtain access token for the user.";
const char kTokenServiceNotAvailable[] = "Failed to get token service.";
const int kObfuscatedGaiaIdTimeoutInDays = 30;
}

namespace extensions {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ namespace {

// Error messages.
const char kFileError[] = "File error %d.";
const char kQuotaError[] = "Quota error %d.";
const char kUnsupportedConflictResolutionPolicy[] =
"Policy %s is not supported.";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ const char kVolumeKey[] = "volume";

// System update states.
const char kNotAvailableState[] = "NotAvailable";
const char kUpdatingState[] = "Updating";
const char kNeedRestartState[] = "NeedRestart";

#if defined(OS_CHROMEOS)
const char kUpdatingState[] = "Updating";
#endif // defined(OS_CHROMEOS)

// Dispatches an extension event with |argument|
void DispatchEvent(const std::string& event_name, base::Value* argument) {
scoped_ptr<base::ListValue> list_args(new base::ListValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ namespace {
const char kCapturingSameTab[] = "Cannot capture a tab with an active stream.";
const char kFindingTabError[] = "Error finding tab to capture.";
const char kNoAudioOrVideo[] = "Capture failed. No audio or video requested.";
const char kPermissionError[] = "Tab Capture API flag is not enabled.";
const char kGrantError[] =
"Extension has not been invoked for the current page (see activeTab "
"permission). Chrome pages cannot be captured.";
Expand Down
6 changes: 0 additions & 6 deletions chrome/browser/extensions/tab_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ using content::WebContents;

DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::TabHelper);

namespace {

const char kPermissionError[] = "permission_error";

} // namespace

namespace extensions {

TabHelper::ScriptExecutionObserver::ScriptExecutionObserver(
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/webstore_installer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ namespace {
const char kApprovalKey[] = "extensions.webstore_installer";

const char kInvalidIdError[] = "Invalid id";
const char kNoBrowserError[] = "No browser found";
const char kDownloadDirectoryError[] = "Could not create download directory";
const char kDownloadCanceledError[] = "Download canceled";
const char kInstallCanceledError[] = "Install canceled";
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/webstore_standalone_installer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const char kUsersKey[] = "users";
const char kShowUserCountKey[] = "show_user_count";
const char kAverageRatingKey[] = "average_rating";
const char kRatingCountKey[] = "rating_count";
const char kRedirectUrlKey[] = "redirect_url";

const char kInvalidWebstoreItemId[] = "Invalid Chrome Web Store item ID";
const char kWebstoreRequestError[] =
Expand Down
3 changes: 3 additions & 0 deletions chrome/browser/feedback/feedback_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ const int64 kRetryDelayLimit = 14400000; // 4 hours
const char kArbitraryMimeType[] = "application/octet-stream";
const char kLogsAttachmentName[] = "system_logs.zip";

#if defined(OS_CHROMEOS)
const int kChromeOSProductId = 208;
#else
const int kChromeBrowserProductId = 237;
#endif

// Simple net::URLFetcherDelegate to clean up URLFetcher on completion.
class PostCleanup : public net::URLFetcherDelegate {
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/google_apis/drive_api_requests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ namespace google_apis {
namespace {

const char kContentTypeApplicationJson[] = "application/json";
const char kDirectoryMimeType[] = "application/vnd.google-apps.folder";
const char kParentLinkKind[] = "drive#fileLink";

// Parses the JSON value to a resource typed |T| and runs |callback| on the UI
Expand Down
Loading

0 comments on commit 9afc14e

Please sign in to comment.