Skip to content

Commit

Permalink
Remove unneeded extern keywords.
Browse files Browse the repository at this point in the history
TBR=reveman@chromium.org,dgozman@chromium.org,lfg@chromium.org,sdefresne@chromium.org,rockot@chromium.org

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I2b94ac88777958e132dce4772fda9ba12320c560
Reviewed-on: https://chromium-review.googlesource.com/771053
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517467}
  • Loading branch information
leizleiz authored and Commit Bot committed Nov 17, 2017
1 parent 64f4905 commit b1b32d0
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 65 deletions.
34 changes: 17 additions & 17 deletions cc/base/devtools_instrumentation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ namespace cc {
namespace devtools_instrumentation {

namespace internal {
extern const char kCategory[] = TRACE_DISABLED_BY_DEFAULT("devtools.timeline");
extern const char kCategoryFrame[] =
const char kCategory[] = TRACE_DISABLED_BY_DEFAULT("devtools.timeline");
const char kCategoryFrame[] =
TRACE_DISABLED_BY_DEFAULT("devtools.timeline.frame");
extern const char kData[] = "data";
extern const char kFrameId[] = "frameId";
extern const char kLayerId[] = "layerId";
extern const char kLayerTreeId[] = "layerTreeId";
extern const char kPixelRefId[] = "pixelRefId";
const char kData[] = "data";
const char kFrameId[] = "frameId";
const char kLayerId[] = "layerId";
const char kLayerTreeId[] = "layerTreeId";
const char kPixelRefId[] = "pixelRefId";

extern const char kImageDecodeTask[] = "ImageDecodeTask";
extern const char kBeginFrame[] = "BeginFrame";
extern const char kNeedsBeginFrameChanged[] = "NeedsBeginFrameChanged";
extern const char kActivateLayerTree[] = "ActivateLayerTree";
extern const char kRequestMainThreadFrame[] = "RequestMainThreadFrame";
extern const char kBeginMainThreadFrame[] = "BeginMainThreadFrame";
extern const char kDrawFrame[] = "DrawFrame";
extern const char kCompositeLayers[] = "CompositeLayers";
const char kImageDecodeTask[] = "ImageDecodeTask";
const char kBeginFrame[] = "BeginFrame";
const char kNeedsBeginFrameChanged[] = "NeedsBeginFrameChanged";
const char kActivateLayerTree[] = "ActivateLayerTree";
const char kRequestMainThreadFrame[] = "RequestMainThreadFrame";
const char kBeginMainThreadFrame[] = "BeginMainThreadFrame";
const char kDrawFrame[] = "DrawFrame";
const char kCompositeLayers[] = "CompositeLayers";
} // namespace internal

extern const char kPaintSetup[] = "PaintSetup";
extern const char kUpdateLayer[] = "UpdateLayer";
const char kPaintSetup[] = "PaintSetup";
const char kUpdateLayer[] = "UpdateLayer";

ScopedImageDecodeTask::ScopedImageDecodeTask(const void* image_ptr,
DecodeType decode_type,
Expand Down
2 changes: 1 addition & 1 deletion components/arc/arc_prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const char kArcSetNotificationsEnabledDeferred[] =
const char kArcSignedIn[] = "arc.signedin";
// A preference that indicates an ARC comaptible filesystem was chosen for
// the user directory (i.e., the user finished required migration.)
extern const char kArcCompatibleFilesystemChosen[] =
const char kArcCompatibleFilesystemChosen[] =
"arc.compatible_filesystem.chosen";
// A preference that indicates that user accepted Voice Interaction Value Prop.
const char kArcVoiceInteractionValuePropAccepted[] =
Expand Down
2 changes: 1 addition & 1 deletion components/component_updater/configurator_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const char kSwitchRequestParam[] = "test-request";

// 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";
const char kSwitchDisablePings[] = "disable-pings";

// Sets the URL for updates.
const char kSwitchUrlSource[] = "url-source";
Expand Down
9 changes: 4 additions & 5 deletions components/cryptauth/pref_names.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,18 @@ const char kCryptAuthEnrollmentLastEnrollmentTimeSeconds[] =
// The reason that the next enrollment is performed. This should be one of the
// enum values of InvocationReason in
// components/cryptauth/proto/cryptauth_api.proto.
extern const char kCryptAuthEnrollmentReason[] = "cryptauth.enrollment.reason";
const char kCryptAuthEnrollmentReason[] = "cryptauth.enrollment.reason";

// The public key of the user and device enrolled with CryptAuth.
extern const char kCryptAuthEnrollmentUserPublicKey[] =
const char kCryptAuthEnrollmentUserPublicKey[] =
"cryptauth.enrollment.user_public_key";

// The private key of the user and device enrolled with CryptAuth.
extern const char kCryptAuthEnrollmentUserPrivateKey[] =
const char kCryptAuthEnrollmentUserPrivateKey[] =
"cryptauth.enrollment.user_private_key";

// The GCM registration id used for receiving push messages from CryptAuth.
extern const char kCryptAuthGCMRegistrationId[] =
"cryptauth.gcm_registration_id";
const char kCryptAuthGCMRegistrationId[] = "cryptauth.gcm_registration_id";

} // namespace prefs
} // namespace cryptauth
6 changes: 0 additions & 6 deletions components/metrics/metrics_log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ using base::SampleCountIterator;

namespace metrics {

namespace internal {
// Maximum number of events before truncation.
extern const int kOmniboxEventLimit = 5000;
extern const int kUserActionEventLimit = 5000;
}

namespace {

// A simple class to write histogram data to a log.
Expand Down
11 changes: 6 additions & 5 deletions components/metrics/metrics_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ class HistogramSamples;

namespace metrics {

namespace internal {
extern const int kOmniboxEventLimit;
extern const int kUserActionEventLimit;
}

class MetricsProvider;
class MetricsServiceClient;
class DelegatingProvider;

namespace internal {
// Maximum number of events before truncation.
constexpr int kOmniboxEventLimit = 5000;
constexpr int kUserActionEventLimit = 5000;
} // namespace internal

class MetricsLog {
public:
enum LogType {
Expand Down
6 changes: 3 additions & 3 deletions components/ntp_tiles/constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ namespace ntp_tiles {

const char kPopularSitesFieldTrialName[] = "NTPPopularSites";

extern const base::Feature kPopularSitesBakedInContentFeature{
const base::Feature kPopularSitesBakedInContentFeature{
"NTPPopularSitesBakedInContent", base::FEATURE_ENABLED_BY_DEFAULT};

extern const base::Feature kNtpMostLikelyFaviconsFromServerFeature{
const base::Feature kNtpMostLikelyFaviconsFromServerFeature{
"NTPMostLikelyFaviconsFromServer", base::FEATURE_ENABLED_BY_DEFAULT};

extern const base::Feature kSiteExplorationUiFeature{
const base::Feature kSiteExplorationUiFeature{
"SiteExplorationUi", base::FEATURE_DISABLED_BY_DEFAULT};

bool AreNtpMostLikelyFaviconsFromServerEnabled() {
Expand Down
2 changes: 0 additions & 2 deletions components/offline_pages/core/offline_event_logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

namespace offline_pages {

extern const size_t kMaxLogCount = 50;

OfflineEventLogger::OfflineEventLogger()
: activities_(0), is_logging_(false), client_(nullptr) {}

Expand Down
7 changes: 3 additions & 4 deletions components/offline_pages/core/offline_event_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@

namespace offline_pages {

// Maximum number of recorded Logs to keep track of at any moment. Defined in
// offline_event_logger.cc.
extern const size_t kMaxLogCount;
// Maximum number of recorded Logs to keep track of at any moment.
constexpr size_t kMaxLogCount = 50;

// Facilitates the logging of events. Subclasses should create methods that
// call RecordActivity to write into the log. |SetIsLogging|, |GetLogs|, and
Expand All @@ -34,7 +33,7 @@ class OfflineEventLogger {
// to the event logger instance.
class Client {
public:
virtual ~Client(){};
virtual ~Client() {}
virtual void CustomLog(const std::string& message) = 0;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ const base::Feature kEnablePasswordForceSaving = {
"enable-password-force-saving", base::FEATURE_DISABLED_BY_DEFAULT};

// Enable the user to trigger password generation manually.
extern const base::Feature kEnableManualPasswordGeneration = {
const base::Feature kEnableManualPasswordGeneration = {
"enable-manual-password-generation", base::FEATURE_ENABLED_BY_DEFAULT};

// Enables username correction while saving username and password details.
extern const base::Feature kEnableUsernameCorrection{
"EnableUsernameCorrection", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kEnableUsernameCorrection{"EnableUsernameCorrection",
base::FEATURE_ENABLED_BY_DEFAULT};

// Enables password selection while saving username and password details.
extern const base::Feature kEnablePasswordSelection{
"EnablePasswordSelection", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kEnablePasswordSelection{"EnablePasswordSelection",
base::FEATURE_ENABLED_BY_DEFAULT};

// Enables the "Show all saved passwords" option in Context Menu.
extern const base::Feature kEnableShowAllSavedPasswordsContextMenu{
const base::Feature kEnableShowAllSavedPasswordsContextMenu{
"kEnableShowAllSavedPasswordsContextMenu",
base::FEATURE_ENABLED_BY_DEFAULT};

Expand Down
4 changes: 2 additions & 2 deletions components/proximity_auth/proximity_auth_pref_names.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const char kEasyUnlockLocalStateUserPrefs[] = "easy_unlock.user_prefs";

// Whether or not EasyUnlock is enabled on the ChromeOS login screen (in
// addition to the lock screen).
extern const char kProximityAuthIsChromeOSLoginEnabled[] =
const char kProximityAuthIsChromeOSLoginEnabled[] =
"proximity_auth.is_chromeos_login_enabled";

// The timestamp of the last password entry in milliseconds, used to enforce
Expand All @@ -40,7 +40,7 @@ const char kProximityAuthLastPromotionCheckTimestampMs[] =
"proximity_auth.last_promotion_check_timestamp_ms";

// The number of times the promotion was shown to the user.
extern const char kProximityAuthPromotionShownCount[] =
const char kProximityAuthPromotionShownCount[] =
"proximity_auth.promotion_shown_count";

// The dictionary containing remote BLE devices.
Expand Down
6 changes: 3 additions & 3 deletions components/safe_browsing/web_ui/constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ const char kChromeUISafeBrowsingURL[] = "chrome://safe-browsing/";
const char kChromeUISafeBrowsingHost[] = "safe-browsing";
const char kSbUnderConstruction[] =
"The safe browsing page is under construction.";
extern const char kChromeUISafeBrowsingMatchMalwareUrl[] =
const char kChromeUISafeBrowsingMatchMalwareUrl[] =
"chrome://safe-browsing/match?type=malware";
extern const char kChromeUISafeBrowsingMatchPhishingUrl[] =
const char kChromeUISafeBrowsingMatchPhishingUrl[] =
"chrome://safe-browsing/match?type=phishing";
extern const char kChromeUISafeBrowsingMatchUnwantedUrl[] =
const char kChromeUISafeBrowsingMatchUnwantedUrl[] =
"chrome://safe-browsing/match?type=unwanted";

} // namespace safe_browsing
2 changes: 1 addition & 1 deletion components/signin/core/browser/signin_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const char kAccountConsistencyDice[] = "dice";
#endif

// Enables sending EnableRefreshTokenAnnotationRequest.
extern const char kEnableRefreshTokenAnnotationRequest[] =
const char kEnableRefreshTokenAnnotationRequest[] =
"enable-refresh-token-annotation-request";

// Enables multiple account versions of chrome.identity APIs.
Expand Down
2 changes: 1 addition & 1 deletion content/public/common/content_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const char kDisableBackingStoreLimit[] = "disable-backing-store-limit";

// Disable backgrounding renders for occluded windows. Done for tests to avoid
// nondeterministic behavior.
extern const char kDisableBackgroundingOccludedWindowsForTesting[] =
const char kDisableBackgroundingOccludedWindowsForTesting[] =
"disable-backgrounding-occluded-windows";

// Disable task throttling of timer tasks from background pages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace extensionoptions {

// API namespace.
extern const char kAPINamespace[] = "extensionOptionsInternal";
const char kAPINamespace[] = "extensionOptionsInternal";

const char kExtensionId[] = "extension";

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

// API namespace.
extern const char kAPINamespace[] = "extensionViewInternal";
const char kAPINamespace[] = "extensionViewInternal";

// Attributes.
const char kAttributeExtension[] = "extension";
Expand Down
5 changes: 2 additions & 3 deletions ios/chrome/browser/ios_chrome_flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ const char kPropertyAnimationsToolbarDescription[] =
"When enabled, Toolbar animations will be done using "
"UIViewPropertyAnimator";

extern const char kSafeAreaCompatibleToolbarName[] =
"Safe Area Compatible Toolbar";
extern const char kSafeAreaCompatibleToolbarDescription[] =
const char kSafeAreaCompatibleToolbarName[] = "Safe Area Compatible Toolbar";
const char kSafeAreaCompatibleToolbarDescription[] =
"When enabled, the toolbar resizes itself when the safe area changes.";

const char kShareCanonicalURLName[] = "Share Canonical URL";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#error "This file requires ARC support."
#endif

extern const base::Feature kPropertyAnimationsToolbar{
const base::Feature kPropertyAnimationsToolbar{
"PropertyAnimationsToolbar", base::FEATURE_DISABLED_BY_DEFAULT};

const base::Feature kCleanToolbar{"CleanToolbar",
Expand Down
4 changes: 2 additions & 2 deletions mojo/edk/system/ports/name.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace mojo {
namespace edk {
namespace ports {

extern const PortName kInvalidPortName = {0, 0};
const PortName kInvalidPortName = {0, 0};

extern const NodeName kInvalidNodeName = {0, 0};
const NodeName kInvalidNodeName = {0, 0};

std::ostream& operator<<(std::ostream& stream, const Name& name) {
std::ios::fmtflags flags(stream.flags());
Expand Down

0 comments on commit b1b32d0

Please sign in to comment.