summaryrefslogtreecommitdiff
path: root/chromium/content/public/common/content_constants.cc
blob: 4fd4097a3ff33cbd6226311cd59d94cf61e7b6c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/public/common/content_constants.h"

#include "build/branding_buildflags.h"

namespace content {

const base::FilePath::CharType kAppCacheDirname[] =
    FILE_PATH_LITERAL("Application Cache");
const base::FilePath::CharType kPepperDataDirname[] =
    FILE_PATH_LITERAL("Pepper Data");

const char kBrowserPluginMimeType[] = "application/browser-plugin";

const char kFlashPluginName[] = "Shockwave Flash";
const char kFlashPluginSwfMimeType[] = "application/x-shockwave-flash";
const char kFlashPluginSwfExtension[] = "swf";
const char kFlashPluginSwfDescription[] = "Shockwave Flash";
const char kFlashPluginSplMimeType[] = "application/futuresplash";
const char kFlashPluginSplExtension[] = "spl";
const char kFlashPluginSplDescription[] = "FutureSplash Player";

const size_t kMaxURLDisplayChars = 32 * 1024;

#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
const char kStatsFilename[] = "ChromeStats2";
#else
const char kStatsFilename[] = "ChromiumStats2";
#endif

const int kStatsMaxThreads = 32;
const int kStatsMaxCounters = 3000;

const int kHistogramSynchronizerReservedSequenceNumber = 0;

// TODO(jkarlin): The value is high to reduce the chance of the detachable
// request timing out, forcing a blocked second request to open a new connection
// and start over. Reduce this value once we have a better idea of what it
// should be and once we stop blocking multiple simultaneous requests for the
// same resource (see bugs 46104 and 31014).
const int kDefaultDetachableCancelDelayMs = 30000;

const char kCorsExemptPurposeHeaderName[] = "Purpose";
const char kCorsExemptRequestedWithHeaderName[] = "X-Requested-With";

#if defined(OS_LINUX)
const int kLowestRendererOomScore = 300;
const int kHighestRendererOomScore = 1000;

// The minimum amount to bump a score by.  This is large enough that
// even if it's translated into the old values, it will still go up
// by at least one.
static const int kOomScoreBump = 100;

// Browsers and zygotes should still be killable, but killed last.
const int kZygoteOomScore = 0;
// For "miscellaneous" things, we want them after renderers, but before plugins.
const int kMiscOomScore = kLowestRendererOomScore - kOomScoreBump;
// We want plugins to die after the renderers.
const int kPluginOomScore = kMiscOomScore - kOomScoreBump;

static_assert(kMiscOomScore > 0, "kMiscOomScore should be greater than 0");
static_assert(kPluginOomScore > 0, "kPluginOomScore should be greater than 0");
#endif

}  // namespace content