NOLINT. More...
Namespaces | |
namespace | css_util |
Classes | |
class | ApacheCache |
class | ApacheConfig |
class | ApacheMessageHandler |
class | ApacheResourceManager |
class | ApacheRewriteDriverFactory |
Creates an Apache RewriteDriver. More... | |
class | ApacheThreadSystem |
class | AprFileSystem |
class | AprTimer |
class | InstawebContext |
struct | SerfStats |
class | SerfUrlAsyncFetcher |
class | BlinkFlow |
class | BlinkFlowCriticalLine |
class | HtmlDetector |
class | ProxyFetchFactory |
class | ProxyFetchPropertyCallback |
class | ProxyFetchPropertyCallbackCollector |
Tracks a collection of property-cache lookups occuring in parallel. More... | |
class | ProxyFetch |
class | ProxyInterface |
class | ResourceFetch |
class | FileRewriter |
class | StaticRewriter |
class | HtmlEvent |
class | HtmlStartDocumentEvent |
class | HtmlEndDocumentEvent |
class | HtmlStartElementEvent |
class | HtmlEndElementEvent |
class | HtmlLeafNodeEvent |
class | HtmlIEDirectiveEvent |
class | HtmlCdataEvent |
class | HtmlCommentEvent |
class | HtmlCharactersEvent |
class | HtmlDirectiveEvent |
class | HtmlLexer |
class | HtmlTestingPeer |
class | CanonicalAttributes |
class | DocType |
class | EmptyHtmlFilter |
class | ExplicitCloseTag |
class | FileDriver |
class | FileStatisticsLog |
Statistics logger that sends its output to a file. More... | |
class | HtmlElement |
class | HtmlFilter |
class | HtmlKeywords |
class | HtmlName |
class | HtmlNode |
Base class for HtmlElement and HtmlLeafNode. More... | |
class | HtmlLeafNode |
class | HtmlCdataNode |
Leaf node representing a CDATA section. More... | |
class | HtmlCharactersNode |
Leaf node representing raw characters in HTML. More... | |
class | HtmlCommentNode |
Leaf node representing an HTML comment. More... | |
class | HtmlIEDirectiveNode |
Leaf node representing an HTML IE directive. More... | |
class | HtmlDirectiveNode |
Leaf node representing an HTML directive. More... | |
class | HtmlParse |
class | HtmlParseTestBaseNoAlloc |
class | HtmlParseTestBase |
class | HtmlWriterFilter |
class | LoggingFilter |
class | StatisticsLog |
class | AsyncFetch |
class | StringAsyncFetch |
class | AsyncFetchUsingWriter |
class | SharedAsyncFetch |
class | FallbackSharedAsyncFetch |
class | ConditionalSharedAsyncFetch |
class | BotChecker |
class | CacheUrlAsyncFetcher |
struct | ContentType |
class | CountingUrlAsyncFetcher |
class | FakeUrlAsyncFetcher |
class | FetcherTest |
class | Headers |
Read/write API for HTTP headers (shared base class). More... | |
class | HTTPCache |
class | HttpDumpUrlAsyncWriter |
class | HttpDumpUrlFetcher |
class | HttpDumpUrlWriter |
class | HttpResponseParser |
class | HTTPValue |
class | HTTPValueWriter |
class | InflatingFetch |
struct | HttpAttributes |
class | MockCallback |
class | ExpectStringAsyncFetch |
class | MockUrlFetcher |
class | RateControllingUrlAsyncFetcher |
class | RequestHeaders |
Read/write API for HTTP request (RequestHeaders is a misnomer). More... | |
class | ResponseHeaders |
Read/write API for HTTP response headers. More... | |
class | ResponseHeadersParser |
Parses a stream of HTTP header text into a ResponseHeaders instance. More... | |
class | SyncFetcherAdapter |
class | SyncFetcherAdapterCallback |
Class to help run an asynchronous fetch synchronously with a timeout. More... | |
class | UrlAsyncFetcher |
class | UrlFetcher |
class | UrlPollableAsyncFetcher |
class | UserAgentMatcher |
class | WaitUrlAsyncFetcher |
class | WgetUrlFetcher |
Runs 'wget' via popen for blocking URL fetches. More... | |
class | WriteThroughHTTPCache |
Composes two cache interfaces to form a two level http cache. More... | |
class | JsKeywords |
class | JsLexer |
Lexical analysis class for Javascript. More... | |
class | AddHeadFilter |
class | AddInstrumentationFilter |
Injects javascript instrumentation for monitoring page-rendering time. More... | |
class | AjaxRewriteResourceSlot |
class | AjaxRewriteContext |
Context that is used for an ajax rewrite. More... | |
class | RecordingFetch |
class | BaseTagFilter |
class | BlinkCriticalLineDataFinder |
class | CacheExtender |
class | CollapseWhitespaceFilter |
class | CommonFilter |
class | CriticalImagesCallback |
class | CriticalImagesFinder |
class | CssCombineFilter |
class | CssFilter |
class | CssFlattenImportsContext |
Context used by CssFilter under async flow that flattens . More... | |
class | CssHierarchy |
class | CssImageRewriter |
class | CssInlineFilter |
Inline small CSS files. More... | |
class | CssInlineImportToLinkFilter |
class | CssMinify |
class | CssMoveToHeadFilter |
class | CssOutlineFilter |
Filter to take explicit <style> and <script> tags and outline them to files. More... | |
class | CssResourceSlot |
A place storing a rewritable URL inside a CSS AST. More... | |
class | CssResourceSlotFactory |
class | CssRewriteTestBase |
class | CssTagScanner |
class | RewriteDomainTransformer |
class | CssUrlEncoder |
class | DataUrlInputResource |
class | DelayImagesFilter |
class | DetectReflowJsDeferFilter |
class | DeterministicJsFilter |
class | DivStructureFilter |
class | DomainLawyer |
class | DomainRewriteFilter |
class | ElideAttributesFilter |
Remove attributes and attribute values that can be safely elided. More... | |
class | FileInputResource |
class | FileLoadPolicy |
class | FlushHtmlFilter |
class | ScriptEditor |
Edit a substring in a script element. More... | |
class | GoogleAnalyticsFilter |
class | HtmlAttributeQuoteRemoval |
class | Image |
class | ImageCombineFilter |
class | ImageRewriteFilter |
class | ImageTagScanner |
class | ImageTestBase |
class | ImageUrlEncoder |
class | InlineRewriteContext |
class | InsertGAFilter |
class | JavascriptRewriteConfig |
class | JavascriptCodeBlock |
class | JavascriptFilter |
struct | LibraryInfo |
class | JavascriptLibraryId |
class | JsCombineFilter |
class | JsDeferDisabledFilter |
class | JsDisableFilter |
class | JsInlineFilter |
Inline small Javascript files. More... | |
class | JsOutlineFilter |
Filter to take explicit <style> and <script> tags and outline them to files. More... | |
class | LazyloadImagesFilter |
class | LocalStorageCacheFilter |
class | MetaTagFilter |
class | MockResourceCallback |
class | OutputResource |
class | ProcessContext |
class | RemoveCommentsFilter |
class | Resource |
struct | TimedBool |
A boolean with an expiration date. More... | |
class | ResourceCombiner |
class | ResourceManager |
class | ResourceManagerTestBase |
class | ResourceNamer |
class | ResourceSlot |
class | FetchResourceSlot |
class | HtmlResourceSlot |
class | HtmlResourceSlotComparator |
class | ResourceTagScanner |
class | RewriteContext |
class | RewriteDriver |
class | OptionsAwareHTTPCacheCallback |
class | RewriteDriverFactory |
class | RewriteFilter |
class | RewriteGflags |
class | RewriteOptions |
class | RewriteQuery |
class | RewriteStats |
Collects a few specific statistics variables related to Rewriting. More... | |
class | ScanFilter |
class | ScriptTagScanner |
class | SimpleTextFilter |
class | SingleRewriteContext |
class | StaticJavascriptManager |
Composes URLs for the javascript files injected by the various PSA filters. More... | |
class | StripNonCacheableFilter |
class | StripScriptsFilter |
Remove all scripts from a web page. More... | |
class | TestRewriteDriverFactory |
class | TestUrlNamer |
class | UrlInputResource |
class | UrlLeftTrimFilter |
class | UrlNamer |
class | UrlPartnership |
class | UsageDataReporter |
class | ResourceManagerTestingPeer |
class | CacheTestBase |
class | AbstractClientState |
class | AbstractMutex |
Abstract interface for implementing a mutex. More... | |
class | ScopedMutex |
Helper class for lexically scoped mutexing. More... | |
class | AbstractSharedMemSegment |
class | AbstractSharedMem |
class | Arena |
class | Atom |
struct | AtomCompare |
class | AtomicBool |
class | AtomicInt32 |
class | CacheInterface |
Abstract interface for a cache. More... | |
class | CheckingThreadSystem |
class | ChunkingWriter |
class | CircularBuffer |
class | ClientState |
class | CondvarTestBase |
class | CountingWriter |
Delegates to another writer, but counts bytes along the way. More... | |
class | DelayCache |
See file comment. More... | |
class | FileCache |
Simple C++ implementation of file cache. More... | |
class | FileMessageHandler |
class | BoolOrError |
class | FileSystem |
class | FileSystemLockManager |
class | FileSystemTest |
class | FileWriter |
Writer implementation for directing HTML output to a file. More... | |
class | FilenameEncoder |
class | Function |
class | MemberFunctionBase |
class | MemberFunction0 |
Captures a delayed call to a 0-arg member function as a closure. More... | |
class | MemberFunction1 |
Captures a delayed call to a 1-arg member function as a closure. More... | |
class | MemberFunction2 |
Captures a delayed call to a 2-arg member function as a closure. More... | |
class | MemberFunction3 |
Captures a delayed call to a 3-arg member function as a closure. More... | |
class | GoogleMessageHandler |
class | GoogleTimer |
class | GoogleUrl |
class | GzipInflater |
class | HashedRefererStatistics |
class | HashedRefererStatisticsTestBase |
class | HashedRefererStatisticsTestTemplate |
class | Hasher |
class | LRUCache |
class | MD5Hasher |
class | MemFileSystem |
class | MessageHandler |
class | MockHasher |
class | MockMessageHandler |
class | MockScheduler |
class | MockTimeCache |
See file comment. More... | |
class | MockTimer |
class | NamedLock |
class | NamedLockManager |
class | NullMessageHandler |
Implementation of a message handler that does nothing. More... | |
class | NullMutex |
class | NullRWLock |
class | NullSharedMem |
class | NullStatisticsVariable |
class | NullStatistics |
Simple name/value pair statistics implementation. More... | |
class | NullWriter |
class | Pool |
class | PoolElement |
class | PrintMessageHandler |
A message handler that spews messages to stdout, with no annotation. More... | |
class | PropertyValue |
Holds the value & stability-metadata for a property. More... | |
class | PropertyCache |
Adds property-semantics to a raw cache API. More... | |
class | PropertyPage |
class | PthreadCondvar |
class | PthreadMutex |
Implementation of ThreadSystem::CondvarCapableMutexMutex for Pthread mutexes. More... | |
class | PthreadRWLock |
Implementation of RWLock for Pthread mutexes. More... | |
class | PthreadSharedMem |
class | PthreadThreadSystem |
class | QueryParams |
Parses and rewrites URL query parameters. More... | |
class | QueuedAlarm |
class | QueuedWorker |
See file comment. More... | |
class | QueuedWorkerPool |
class | RefCounted |
class | RefCountedPtr |
class | RefCountedObj |
class | Scheduler |
class | SchedulerBlockingFunction |
class | SchedulerBasedAbstractLock |
class | SchedulerThread |
class | SharedCircularBuffer |
class | SharedCircularBufferTestBase |
This TestBase is added to pthread_shared_mem_test. More... | |
class | SharedCircularBufferTestTemplate |
struct | Entry |
class | SharedDynamicStringMap |
class | SharedDynamicStringMapTestBase |
class | SharedDynamicStringMapTestTemplate |
class | SharedMemLockManager |
namespace SharedMemLockData More... | |
class | SharedMemLockManagerTestBase |
class | SharedMemLockManagerTestTemplate |
class | SharedMemRefererStatistics |
struct | TestUrl |
class | SharedMemRefererStatisticsTestBase |
class | SharedMemRefererStatisticsTestTemplate |
class | SharedMemVariable |
class | SharedMemHistogram |
class | SharedMemStatistics |
class | SharedMemStatisticsTestBase |
class | SharedMemStatisticsTestTemplate |
class | SharedMemTestEnv |
class | SharedMemTestBase |
class | SharedMemTestTemplate |
class | SharedString |
Reference-counted string. This class just adds the StringPiece constructor. More... | |
class | SimpleStatsVariable |
class | SimpleStats |
Simple name/value pair statistics implementation. More... | |
class | SlowWorker |
See file comment. More... | |
class | Variable |
class | Histogram |
class | NullHistogram |
class | TimedVariable |
class | FakeTimedVariable |
TimedVariable implementation that only updates a basic Variable. More... | |
class | Statistics |
Base class for implementations of monitoring statistics. More... | |
class | StatisticsTemplate |
class | ScalarStatisticsTemplate |
class | StatisticsWorkBound |
class | StdioFileSystem |
struct | CasePreserve |
A helper for case-sensitive hashing. More... | |
struct | CaseFold |
A helper for case-insensitive hashing, which folds to lowercase. More... | |
class | StringMultiMap |
class | StringMultiMapInsensitive |
class | StringMultiMapSensitive |
class | EmptyString |
struct | CharStarCompareInsensitive |
struct | CharStarCompareSensitive |
struct | StringCompareSensitive |
struct | StringCompareInsensitive |
class | StringWriter |
Writer implementation for directing HTML output to a string. More... | |
class | SymbolTable |
class | ThreadSynchronizer |
class | ThreadSystem |
class | ThreadsafeCache |
class | Timer |
Timer interface, made virtual so it can be mocked for tests. More... | |
class | UrlMultipartEncoder |
class | UrlSegmentEncoder |
class | Waveform |
class | Wildcard |
class | WildcardGroup |
class | WorkBound |
class | Worker |
class | WriteThroughCache |
Composes two caches to form a write-through cache. More... | |
class | Writer |
Interface for writing bytes to an output stream. More... | |
class | ThreadSystemTestBase |
class | ThreadSystemTestTemplate |
class | WorkerTestBase |
class | DeleteNotifyFunction |
Function that signals on destruction and check fails when run. More... | |
Typedefs | |
typedef std::set< const HtmlEvent * > | ConstHtmlEventSet |
typedef std::list< HtmlEvent * > | HtmlEventList |
typedef HtmlEventList::iterator | HtmlEventListIterator |
typedef std::map< GoogleString, const Panel * > | PanelIdToSpecMap |
typedef std::multimap < GoogleString, std::pair < GoogleString, const int > > | AttributesToNonCacheableValuesMap |
typedef RefCountedPtr < CssResourceSlot > | CssResourceSlotPtr |
typedef RefCountedPtr< Resource > | ResourcePtr |
typedef std::vector< ResourcePtr > | ResourceVector |
typedef RefCountedPtr < OutputResource > | OutputResourcePtr |
typedef std::vector < OutputResourcePtr > | OutputResourceVector |
typedef RefCountedPtr < ResourceSlot > | ResourceSlotPtr |
typedef RefCountedPtr < HtmlResourceSlot > | HtmlResourceSlotPtr |
typedef std::vector < ResourceSlotPtr > | ResourceSlotVector |
typedef std::set < HtmlResourceSlotPtr, HtmlResourceSlotComparator > | HtmlResourceSlotSet |
typedef std::set< Atom, AtomCompare > | AtomSet |
typedef base::StringPiece | StringPiece |
typedef google::protobuf::io::StringOutputStream | StringOutputStream |
typedef google::protobuf::io::ArrayInputStream | ArrayInputStream |
typedef std::map< GoogleString, GoogleString > | StringStringMap |
typedef std::set< GoogleString > | StringSet |
typedef std::set< GoogleString, StringCompareInsensitive > | StringSetInsensitive |
typedef std::vector< GoogleString > | StringVector |
typedef std::vector< StringPiece > | StringPieceVector |
typedef std::vector< const GoogleString * > | ConstStringStarVector |
typedef std::vector < GoogleString * > | StringStarVector |
typedef std::vector< const char * > | CharStarVector |
typedef SymbolTable< CaseFold > | SymbolTableInsensitive |
typedef SymbolTable< CasePreserve > | SymbolTableSensitive |
Enumerations | |
enum | OutputResourceKind { kRewrittenResource, kOnTheFlyResource, kOutlinedResource } |
enum | RewriteResult { kRewriteFailed, kRewriteOk, kTooBusy } |
enum | Encoding { UNKNOWN, BASE64, PLAIN } |
enum | MessageType { kInfo, kWarning, kError, kFatal } |
Functions | |
void | SlurpUrl (ApacheResourceManager *manager, request_rec *r) |
void | AprReportError (MessageHandler *message_handler, const char *filename, int line, const char *message, int error_code) |
void | ApacheRequestToRequestHeaders (const request_rec &request, RequestHeaders *meta_data) |
Converts Apache header structure into RequestHeaders. | |
void | ApacheRequestToResponseHeaders (const request_rec &request, ResponseHeaders *meta_data) |
void | ResponseHeadersToApacheRequest (const ResponseHeaders &meta_data, request_rec *request) |
Converts ResponseHeaders into an Apache request. | |
void | AddResponseHeadersToRequest (const ResponseHeaders &response_headers, request_rec *request) |
void | DisableDownstreamHeaderFilters (request_rec *request) |
Remove downstream filters that might corrupt our caching headers. | |
void | PrintHeaders (request_rec *request) |
Debug utility for printing Apache headers to stdout. | |
apr_status_t | instaweb_handler (request_rec *request) |
apr_status_t | save_url_hook (request_rec *request) |
apr_status_t | instaweb_map_to_storage (request_rec *request) |
void | attach_mod_spdy () |
Needs to be called from a ap_hook_optional_fn_retrieve hook. | |
int | mod_spdy_get_spdy_version (conn_rec *conn) |
const ContentType * | NameExtensionToContentType (const StringPiece &name) |
const ContentType * | MimeTypeToContentType (const StringPiece &mime_type) |
bool | ParseContentType (const StringPiece &content_type_str, GoogleString *mime_type, GoogleString *charset) |
Image * | NewImage (const StringPiece &original_contents, const GoogleString &url, const StringPiece &file_prefix, Image::CompressionOptions *options, MessageHandler *handler) |
Image * | BlankImage (int width, int height, Image::Type type, const StringPiece &tmp_dir, MessageHandler *handler) |
int | CharToInt (char c) |
char to int *without sign extension*. | |
int | JpegIntAtPosition (const StringPiece &buf, size_t pos) |
int | GifIntAtPosition (const StringPiece &buf, size_t pos) |
int | PngIntAtPosition (const StringPiece &buf, size_t pos) |
bool | PngSectionIdIs (const char *hdr, const StringPiece &buf, size_t pos) |
bool | OptimizeWebp (const GoogleString &original_jpeg, GoogleString *compressed_webp) |
bool | ReduceWebpImageQuality (const GoogleString &original_webp, int quality, GoogleString *compressed_webp) |
void | Web64Encode (const StringPiece &in, GoogleString *out) |
bool | Web64Decode (const StringPiece &in, GoogleString *out) |
void | Mime64Encode (const StringPiece &in, GoogleString *out) |
bool | Mime64Decode (const StringPiece &in, GoogleString *out) |
bool | StripUtf8Bom (StringPiece *contents) |
const StringPiece | GetCharsetForBom (const StringPiece contents) |
void | DataUrl (const ContentType &content_type, const Encoding encoding, const StringPiece &content, GoogleString *result) |
bool | ParseDataUrl (const StringPiece &url, const ContentType **content_type, Encoding *encoding, StringPiece *encoded_content) |
bool | DecodeDataUrlContent (Encoding encoding, const StringPiece &encoded_content, GoogleString *decoded_content) |
GoogleString | StackTraceString () |
void | EscapeToJsStringLiteral (const StringPiece &original, bool add_quotes, GoogleString *escaped) |
template<class C > | |
Function * | MakeFunction (C *object, void(C::*run)()) |
Makes a Function* that calls a 0-arg class method. | |
template<class C > | |
Function * | MakeFunction (C *object, void(C::*run)(), void(C::*cancel)()) |
template<class C , class T > | |
Function * | MakeFunction (C *object, void(C::*run)(T), T t) |
Makes a Function* that calls a 1-arg class method. | |
template<class C , class T > | |
Function * | MakeFunction (C *object, void(C::*run)(T), void(C::*cancel)(), T t) |
template<class C , class T , class U > | |
Function * | MakeFunction (C *object, void(C::*run)(T, U), T t, U u) |
Makes a Function* that calls a 2-arg class method. | |
template<class C , class T , class U > | |
Function * | MakeFunction (C *object, void(C::*run)(T, U), void(C::*cancel)(), T t, U u) |
template<class C , class T , class U , class V > | |
Function * | MakeFunction (C *object, void(C::*run)(T, U, V), T t, U u, V v) |
Makes a Function* that calls a 3-arg class method. | |
template<class C , class T , class U , class V > | |
Function * | MakeFunction (C *object, void(C::*run)(T, U, V), void(C::*cancel)(), T t, U u, V v) |
GoogleString | GTestSrcDir () |
GoogleString | GTestTempDir () |
TYPED_TEST_CASE_P (HashedRefererStatisticsTestTemplate) | |
TYPED_TEST_P (HashedRefererStatisticsTestTemplate, TestHashed) | |
REGISTER_TYPED_TEST_CASE_P (HashedRefererStatisticsTestTemplate, TestHashed) | |
uint64 | RollingHash (const char *buf, size_t start, size_t n) |
Compute the rolling hash of buf[start : start + n - 1]. | |
uint64 | NextRollingHash (const char *buf, size_t start, size_t n, uint64 prev) |
TYPED_TEST_CASE_P (SharedCircularBufferTestTemplate) | |
TYPED_TEST_P (SharedCircularBufferTestTemplate, TestCreate) | |
TYPED_TEST_P (SharedCircularBufferTestTemplate, TestAdd) | |
TYPED_TEST_P (SharedCircularBufferTestTemplate, TestClear) | |
TYPED_TEST_P (SharedCircularBufferTestTemplate, TestCircular) | |
REGISTER_TYPED_TEST_CASE_P (SharedCircularBufferTestTemplate, TestCreate, TestAdd, TestClear, TestCircular) | |
TYPED_TEST_CASE_P (SharedDynamicStringMapTestTemplate) | |
TYPED_TEST_P (SharedDynamicStringMapTestTemplate, TestSimple) | |
TYPED_TEST_P (SharedDynamicStringMapTestTemplate, TestCreate) | |
TYPED_TEST_P (SharedDynamicStringMapTestTemplate, TestAdd) | |
TYPED_TEST_P (SharedDynamicStringMapTestTemplate, TestQuarterFull) | |
TYPED_TEST_P (SharedDynamicStringMapTestTemplate, TestFillSingleThread) | |
TYPED_TEST_P (SharedDynamicStringMapTestTemplate, TestFillMultipleNonOverlappingThreads) | |
TYPED_TEST_P (SharedDynamicStringMapTestTemplate, TestFillMultipleOverlappingThreads) | |
REGISTER_TYPED_TEST_CASE_P (SharedDynamicStringMapTestTemplate, TestSimple, TestCreate, TestAdd, TestQuarterFull, TestFillSingleThread, TestFillMultipleNonOverlappingThreads, TestFillMultipleOverlappingThreads) | |
TYPED_TEST_CASE_P (SharedMemLockManagerTestTemplate) | |
TYPED_TEST_P (SharedMemLockManagerTestTemplate, TestBasic) | |
TYPED_TEST_P (SharedMemLockManagerTestTemplate, TestDestructorUnlock) | |
TYPED_TEST_P (SharedMemLockManagerTestTemplate, TestSteal) | |
REGISTER_TYPED_TEST_CASE_P (SharedMemLockManagerTestTemplate, TestBasic, TestDestructorUnlock, TestSteal) | |
TYPED_TEST_CASE_P (SharedMemRefererStatisticsTestTemplate) | |
TYPED_TEST_P (SharedMemRefererStatisticsTestTemplate, TestGetDivLocationFromUrl) | |
TYPED_TEST_P (SharedMemRefererStatisticsTestTemplate, TestSimple) | |
TYPED_TEST_P (SharedMemRefererStatisticsTestTemplate, TestResource) | |
TYPED_TEST_P (SharedMemRefererStatisticsTestTemplate, TestIgnoreQueryParams) | |
TYPED_TEST_P (SharedMemRefererStatisticsTestTemplate, TestDivLocation) | |
TYPED_TEST_P (SharedMemRefererStatisticsTestTemplate, TestDumpFast) | |
TYPED_TEST_P (SharedMemRefererStatisticsTestTemplate, TestDumpSimple) | |
TYPED_TEST_P (SharedMemRefererStatisticsTestTemplate, TestDumpOrganized) | |
TYPED_TEST_P (SharedMemRefererStatisticsTestTemplate, TestMultiProcess) | |
REGISTER_TYPED_TEST_CASE_P (SharedMemRefererStatisticsTestTemplate, TestGetDivLocationFromUrl, TestSimple, TestResource, TestIgnoreQueryParams, TestDivLocation, TestDumpFast, TestDumpSimple, TestDumpOrganized, TestMultiProcess) | |
TYPED_TEST_CASE_P (SharedMemStatisticsTestTemplate) | |
TYPED_TEST_P (SharedMemStatisticsTestTemplate, TestCreate) | |
TYPED_TEST_P (SharedMemStatisticsTestTemplate, TestSet) | |
TYPED_TEST_P (SharedMemStatisticsTestTemplate, TestClear) | |
TYPED_TEST_P (SharedMemStatisticsTestTemplate, TestAdd) | |
TYPED_TEST_P (SharedMemStatisticsTestTemplate, TestHistogram) | |
TYPED_TEST_P (SharedMemStatisticsTestTemplate, TestHistogramRender) | |
TYPED_TEST_P (SharedMemStatisticsTestTemplate, TestTimedVariableEmulation) | |
REGISTER_TYPED_TEST_CASE_P (SharedMemStatisticsTestTemplate, TestCreate, TestSet, TestClear, TestAdd, TestHistogram, TestHistogramRender, TestTimedVariableEmulation) | |
TYPED_TEST_CASE_P (SharedMemTestTemplate) | |
TYPED_TEST_P (SharedMemTestTemplate, TestRewrite) | |
TYPED_TEST_P (SharedMemTestTemplate, TestRewriteReattach) | |
TYPED_TEST_P (SharedMemTestTemplate, TestLarge) | |
TYPED_TEST_P (SharedMemTestTemplate, TestDistinct) | |
TYPED_TEST_P (SharedMemTestTemplate, TestDestroy) | |
TYPED_TEST_P (SharedMemTestTemplate, TestCreateTwice) | |
TYPED_TEST_P (SharedMemTestTemplate, TestTwoKids) | |
TYPED_TEST_P (SharedMemTestTemplate, TestMutex) | |
REGISTER_TYPED_TEST_CASE_P (SharedMemTestTemplate, TestRewrite, TestRewriteReattach, TestLarge, TestDistinct, TestDestroy, TestCreateTwice, TestTwoKids, TestMutex) | |
template<class CharTransform , typename IntType > | |
IntType | HashString (const char *s, size_t len) |
size_t | JoinHash (size_t a, size_t b) |
GoogleString | IntegerToString (int i) |
GoogleString | Integer64ToString (int64 i) |
GoogleString | PointerToString (void *pointer) |
bool | StringToInt (const char *in, int *out) |
bool | StringToInt64 (const char *in, int64 *out) |
bool | StringToInt (const GoogleString &in, int *out) |
bool | StringToInt64 (const GoogleString &in, int64 *out) |
GoogleString | StrCat (const StringPiece &a, const StringPiece &b, const StringPiece &c=EmptyString::kEmptyString, const StringPiece &d=EmptyString::kEmptyString, const StringPiece &e=EmptyString::kEmptyString, const StringPiece &f=EmptyString::kEmptyString, const StringPiece &g=EmptyString::kEmptyString, const StringPiece &h=EmptyString::kEmptyString) |
void | StrAppend (GoogleString *target, const StringPiece &a, const StringPiece &b=EmptyString::kEmptyString, const StringPiece &c=EmptyString::kEmptyString, const StringPiece &d=EmptyString::kEmptyString, const StringPiece &e=EmptyString::kEmptyString, const StringPiece &f=EmptyString::kEmptyString, const StringPiece &g=EmptyString::kEmptyString, const StringPiece &h=EmptyString::kEmptyString) |
void | SplitStringPieceToVector (const StringPiece &sp, const StringPiece &separators, StringPieceVector *components, bool omit_empty_strings) |
void | SplitStringUsingSubstr (const GoogleString &full, const GoogleString &substr, StringVector *result) |
void | BackslashEscape (const StringPiece &src, const StringPiece &to_escape, GoogleString *dest) |
GoogleString | CEscape (const StringPiece &src) |
bool | HasPrefixString (const StringPiece &str, const StringPiece &prefix) |
void | UpperString (GoogleString *str) |
void | LowerString (GoogleString *str) |
bool | OnlyWhitespace (const GoogleString &str) |
int | GlobalReplaceSubstring (const StringPiece &substring, const StringPiece &replacement, GoogleString *s) |
int | FindIgnoreCase (StringPiece haystack, StringPiece needle) |
GoogleString | JoinStringStar (const ConstStringStarVector &vector, const StringPiece &delim) |
char | UpperChar (char c) |
char | LowerChar (char c) |
char * | strdup (const char *str) |
int | StringCaseCompare (const StringPiece &s1, const StringPiece &s2) |
Case-insensitive string comparison that is locale-independent. | |
bool | IsAsciiAlphaNumeric (char ch) |
void | TrimWhitespace (const StringPiece &in, GoogleString *output) |
void | TrimWhitespace (StringPiece *str) |
void | TrimLeadingWhitespace (StringPiece *str) |
Trims only whitespace at the beginning of the string. | |
bool | AccumulateDecimalValue (char c, uint32 *value) |
bool | AccumulateHexValue (char c, uint32 *value) |
bool | StringCaseEqual (const StringPiece &s1, const StringPiece &s2) |
Return true iff the two strings are equal, ignoring case. | |
bool | StringCaseStartsWith (const StringPiece &str, const StringPiece &prefix) |
Return true iff str starts with prefix, ignoring case. | |
bool | StringCaseEndsWith (const StringPiece &str, const StringPiece &suffix) |
Return true iff str ends with suffix, ignoring case. | |
bool | StringEqualConcat (const StringPiece &str, const StringPiece &first, const StringPiece &second) |
bool | EndsInSlash (const StringPiece &path) |
Does a path end in slash? | |
void | EnsureEndsInSlash (GoogleString *dir) |
Make sure directory's path ends in '/'. | |
void | ParseShellLikeString (const StringPiece &input, std::vector< GoogleString > *output) |
int | CountSubstring (const StringPiece &text, const StringPiece &substring) |
bool | HasIllicitTokenCharacter (const StringPiece &str) |
GoogleString * | StringVectorAdd (StringVector *v) |
Appends new empty string to a StringVector and returns a pointer to it. | |
bool | ConvertTimeToString (int64 time_ms, GoogleString *time_string) |
Converts time, in milliseconds, to a string. Returns false on failure. | |
bool | ConvertTimeToStringWithUs (int64 time_us, GoogleString *time_string) |
bool | ConvertStringToTime (const StringPiece &time_string, int64 *time_ms) |
TYPED_TEST_CASE_P (ThreadSystemTestTemplate) | |
TYPED_TEST_P (ThreadSystemTestTemplate, TestStartJoin) | |
TYPED_TEST_P (ThreadSystemTestTemplate, TestSync) | |
REGISTER_TYPED_TEST_CASE_P (ThreadSystemTestTemplate, TestStartJoin, TestSync) | |
Variables | |
const char | kPagespeedOriginalUrl [] = "mod_pagespeed_original_url" |
const ContentType & | kContentTypeHtml |
HTML-like (i.e. rewritable) text: | |
const ContentType & | kContentTypeXhtml |
const ContentType & | kContentTypeCeHtml |
const ContentType & | kContentTypeJavascript |
Other text: | |
const ContentType & | kContentTypeCss |
const ContentType & | kContentTypeText |
const ContentType & | kContentTypeXml |
const ContentType & | kContentTypePng |
Images: | |
const ContentType & | kContentTypeGif |
const ContentType & | kContentTypeJpeg |
const ContentType & | kContentTypeSwf |
const ContentType & | kContentTypeWebp |
const char | kGaSnippetGetTracker [] = "_modpagespeed_getRewriteTracker(" |
const char | kGaSnippetPrefix [] |
const char | kGaSnippetSuffix [] |
const char | kGASnippet [] |
const char | kGASpeedTracking [] |
const size_t | kJavascriptHashIdBlockSize = 512 |
Size of regions that is hashed to do initial detection. | |
const char | kUtf8Charset [] = "utf-8" |
The charsets we understand. Currently only those that have BOMs below. | |
const char | kUtf16BigEndianCharset [] = "utf-16be" |
const char | kUtf16LittleEndianCharset [] = "utf-16le" |
const char | kUtf32BigEndianCharset [] = "utf-32be" |
const char | kUtf32LittleEndianCharset [] = "utf-32le" |
const char | kUtf8Bom [] = "\xEF\xBB\xBF" |
The Byte-Order-Mark (BOM) for the various UTF encodings. | |
const char | kUtf16BigEndianBom [] = "\xFE\xFF" |
const char | kUtf16LittleEndianBom [] = "\xFF\xFE" |
const char | kUtf32BigEndianBom [] = "\x00\x00\xFE\xFF" |
const char | kUtf32LittleEndianBom [] = "\xFF\xFE\x00\x00" |
const uint64 | kRollingHashCharTable [256] |
Per character hash values. Exported for use in NextRollingHash. | |
const int | kStackBufferSize = 10000 |
NOLINT.
Constant for allocating stack buffers.
Thread-synchronization utility class for reproducing races in unit tests.
for DCHECK
Use Chromium debug support.
Shared infrastructure for testing cache implementations.
for scoped_ptr
Base class for tests which want a ResourceManager.
Some common routines and constants for tests dealing with Images.
Base class for tests which do rewrites within CSS.
namespace Css
for ResourcePtr
DO NOT EDIT. Generated by ./google_analytics_snippet_gen.py.
This permits the use of any UrlPollableAsyncFetcher as a synchronous fetcher.
HttpAttributes, HttpStatus.
Callbacks used for testing.
for size_t
for FILE
Unit-test framework for wget fetcher.
Infrastructure for testing html parsing and rewriting.
for StringPiece
The httpd header must be after the apache_rewrite_driver_factory.h. Otherwise, the compiler will complain "strtoul_is_not_a_portable_function_use_strtol_instead".
The httpd header must be after the meta_data.h. Otherwise, the compiler will complain "strtoul_is_not_a_portable_function_use_strtol_instead".
The httpd header must be after the instaweb_context.h. Otherwise, the compiler will complain "strtoul_is_not_a_portable_function_use_strtol_instead".
This 'string' is not needed for this include. But removing it breaks Page Speed. See third_party/pagespeed/src/pagespeed/html/external_resource_filter.h Remove this once that one is fixed.
html_filter that passes data through unmodified, but logs statistics about the data as it goes by. It should be possible to create many instances of this class and insert them at different points in the rewriting flow Goal is to log: NUM_EXPLICIT_CLOSED - <tag> </tag> pairs NUM_IMPLICIT_CLOSED - <tag> for implicitly-closed tag NUM_BRIEF_CLOSED - </tag> NUM_CLOSED - Sum of above three NUM_UNCLOSED - <tag> without matching </tag> NUM_SPURIOUS_CLOSED - </tag> without preceding <tag>; UNCOUNTED RIGHT NOW! NUM_TAGS - Total number of opening tags NUM_CDATA - cdata sections NUM_COMMENTS - comments NUM_DIRECTIVES - directives NUM_DOCUMENTS - started documents NUM_IE_DIRECTIVES - ie directives Reporting: We report this information via a StatisticsLog: filter.ToString(log) Two sets of statistics (eg before and after processing) can be compared using before.Equals(after),
for pair
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2011 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http:///www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Search for synchronous loads of Google Analytics similar to the following:
<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js type='text/javascript'" + "%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-XXXXX-X"); pageTracker._trackPageview(); } catch(err) {} </script>
Replace the document.write with a new snippet that loads ga.js asynchronously. Also, insert a replacement for _getTracker that converts any calls to the synchronous API to the asynchronous API. The _getTracker replacement is a new function that returns a mock tracker object. Anytime a synchronous API method is called, the mock tracker fowards it to a _gaq.push(...) call.
An alternative approach would been to find all the API calls and rewrite them to the asynchronous API. However, to be done properly, it would have had the added complication of using a JavaScript compiler.
We need to include rewrite_driver.h due to covariant return of html_parse()
A set of utility functions for handling character sets/encodings and related concepts like byte-order-marks (BOM). Currently the only methods relate to BOMs.
Include this file when defining an object that will reside in a pool. There are a couple of ways of defining such an object, but all of them require us to use the PoolPosition typedef. Most simply, we can extend the PoolElement type defined here---but in practice, we want to avoid multiple inheritance just to store a simple back link, and we're better off providing an accessor at pool construction time instead.
This contains things that are common between unit tests for Worker and its subclasses, such as runtime creation and various closures.
typedef std::set<Atom, AtomCompare> net_instaweb::AtomSet |
A set of atoms can be constructed very efficiently. Note that iteration over this set will *not* be in alphabetical order.
typedef google::protobuf::io::StringOutputStream net_instaweb::StringOutputStream |
UNKNOWN |
Used only for output of ParseDataUrl. |
PLAIN |
LATIN1, ///<
|
Used to signal whether optimization was successful or not to RewriteContext::RewriteDone.
bool net_instaweb::AccumulateDecimalValue | ( | char | c, | |
uint32 * | value | |||
) |
Accumulates a decimal value from 'c' into *value. Returns false and leaves *value unchanged if c is not a decimal digit.
bool net_instaweb::AccumulateHexValue | ( | char | c, | |
uint32 * | value | |||
) |
Accumulates a hex value from 'c' into *value Returns false and leaves *value unchanged if c is not a hex digit.
void net_instaweb::AddResponseHeadersToRequest | ( | const ResponseHeaders & | response_headers, | |
request_rec * | request | |||
) |
Adds the name/value pairs in response_headers to the request's response headers.
Image* net_instaweb::BlankImage | ( | int | width, | |
int | height, | |||
Image::Type | type, | |||
const StringPiece & | tmp_dir, | |||
MessageHandler * | handler | |||
) |
Creates a blank image of the given dimensions and type. For now, this is assumed to be an 8-bit 3-channel image.
int net_instaweb::CharToInt | ( | char | c | ) | [inline] |
char to int *without sign extension*.
The following four helper functions were moved here for testability. We ran into problems with sign extension under different compiler versions, and we'd like to catch regressions on that front in the future.
bool net_instaweb::ConvertStringToTime | ( | const StringPiece & | time_string, | |
int64 * | time_ms | |||
) |
Converts time in string format, to the number of milliseconds since 1970. Returns false on failure.
bool net_instaweb::ConvertTimeToStringWithUs | ( | int64 | time_us, | |
GoogleString * | time_string | |||
) |
Converts time, in microseconds, to a string with accuracy at us. Returns false on failure.
int net_instaweb::CountSubstring | ( | const StringPiece & | text, | |
const StringPiece & | substring | |||
) |
Counts the number of times that substring appears in text Note: for a substring that can overlap itself, it counts not necessarily disjoint occurrences of the substring. For example: "aaa" appears in "aaaaa" 3 times, not once
void net_instaweb::DataUrl | ( | const ContentType & | content_type, | |
const Encoding | encoding, | |||
const StringPiece & | content, | |||
GoogleString * | result | |||
) |
Create a data: url from the given content-type and content. See: http://en.wikipedia.org/wiki/Data_URI_scheme
The ENCODING indicates how to encode the content; for binary data this is UTF8, for ascii / Latin1 it's LATIN1. If you have ascii without high bits or NULs, use LATIN1. If you have alphanumeric data, use PLAIN (which doesn't encode at all).
Note in particular that IE<=7 does not support this, so it makes us UserAgent-dependent. It also pretty much requires outgoing content to be compressed as we tend to base64-encode the content.
const StringPiece net_instaweb::GetCharsetForBom | ( | const StringPiece | contents | ) |
Return the charset string for the given contents' BOM if any. If the contents start with one of the BOMs defined above then the corresponding charset is returned, otherwise an empty StringPiece.
int net_instaweb::GlobalReplaceSubstring | ( | const StringPiece & | substring, | |
const StringPiece & | replacement, | |||
GoogleString * | s | |||
) |
Replaces all instances of 'substring' in 's' with 'replacement'. Returns the number of instances replaced. Replacements are not subject to re-matching.
NOTE: The string pieces must not overlap 's'.
IntType net_instaweb::HashString | ( | const char * | s, | |
size_t | len | |||
) | [inline] |
A hash function for strings that can be used both in a case-sensitive and case-insensitive way
This implemention is based on code in third_party/chromium/src/base/hash_tables.h.
bool net_instaweb::HasIllicitTokenCharacter | ( | const StringPiece & | str | ) |
Returns true if the string contains a character that is not legal in an http header.
bool net_instaweb::HasPrefixString | ( | const StringPiece & | str, | |
const StringPiece & | prefix | |||
) |
apr_status_t net_instaweb::instaweb_handler | ( | request_rec * | request | ) |
The content generator for instaweb rewritten resources, for example, a combined CSS file. Requests for not-instaweb rewritten resources will be declined so that other Apache handlers may operate on them.
apr_status_t net_instaweb::instaweb_map_to_storage | ( | request_rec * | request | ) |
By default, apache imposes limitations on URL segments of around 256 characters that appear to correspond to filename limitations. To prevent that, we hook map_to_storage for our own purposes.
bool net_instaweb::IsAsciiAlphaNumeric | ( | char | ch | ) | [inline] |
Determines whether the character is a US Ascii number or letter. This is preferable to isalnum() for working with computer languages, as opposed to human languages.
size_t net_instaweb::JoinHash | ( | size_t | a, | |
size_t | b | |||
) | [inline] |
Combine two hash values in a reasonable way. Here to avoid excessive mysticism in the remainder of the code.
< Uses different prime multipliers.
GoogleString net_instaweb::JoinStringStar | ( | const ConstStringStarVector & | vector, | |
const StringPiece & | delim | |||
) |
Output a string which is the combination of all values in vector, separated by delim. Does not ignore empty strings in vector. So: JoinStringStar({"foo", "", "bar"}, ", ") == "foo, , bar". (Pseudocode)
char net_instaweb::LowerChar | ( | char | c | ) | [inline] |
lower-case a single character and return it. tolower() changes based on locale. We don't want this!
Function* net_instaweb::MakeFunction | ( | C * | object, | |
void(C::*)(T, U, V) | run, | |||
void(C::*)() | cancel, | |||
T | t, | |||
U | u, | |||
V | v | |||
) | [inline] |
Makes a Function* that calls a 3-arg class method, or a 0-arg cancel method.
Function* net_instaweb::MakeFunction | ( | C * | object, | |
void(C::*)(T, U) | run, | |||
void(C::*)() | cancel, | |||
T | t, | |||
U | u | |||
) | [inline] |
Makes a Function* that calls a 2-arg class method, or a 0-arg cancel method.
Function* net_instaweb::MakeFunction | ( | C * | object, | |
void(C::*)(T) | run, | |||
void(C::*)() | cancel, | |||
T | t | |||
) | [inline] |
Makes a Function* that calls a 1-arg class method, or a 0-arg cancel method.
Function* net_instaweb::MakeFunction | ( | C * | object, | |
void(C::*)() | run, | |||
void(C::*)() | cancel | |||
) | [inline] |
Makes a Function* that calls a 0-arg class method, or a 0-arg cancel method.
int net_instaweb::mod_spdy_get_spdy_version | ( | conn_rec * | conn | ) |
If the connection is using SPDY with mod_spdy, returns the protocol version. Otherwise, returns 0.
const ContentType* net_instaweb::NameExtensionToContentType | ( | const StringPiece & | name | ) |
Given a name (file or url), see if it has the canonical extension corresponding to a particular content type.
Image* net_instaweb::NewImage | ( | const StringPiece & | original_contents, | |
const GoogleString & | url, | |||
const StringPiece & | file_prefix, | |||
Image::CompressionOptions * | options, | |||
MessageHandler * | handler | |||
) |
Image owns none of its inputs. All of the arguments to NewImage(...) (the original_contents in particular) must outlive the Image object itself. The intent is that an Image is created in a scoped fashion from an existing known resource.
The webp_preferred flag indicates that webp output should be produced rather than jpg, unless webp creation fails for any reason (in which case jpg is used as a fallback). It has no effect if original_contents are a non-jpg or non-webp image format.
The jpeg_quality flag indicates what quality to use while recompressing jpeg images. Quality value of 75 is used as default for web images by most of the image libraries. Recommended setting for this is 85.
uint64 net_instaweb::NextRollingHash | ( | const char * | buf, | |
size_t | start, | |||
size_t | n, | |||
uint64 | prev | |||
) | [inline] |
Given the rolling hash prev of buf[start - 1 : start + n - 2], efficiently compute the hash of buf[start : start + n - 1]. Note that this indexes buf[start - 1], so we can't just use a StringPiece here. We eschew StringPiece in any case, because of efficiency.
Note that to get efficient operation here for fixed n (eg when we're doing something like Rabin-Karp string matching), we must inline the computation of shift amounts and then hoist them as loop invariants. That is why this function (intended for use in an inner loop) is inlined.
In a reasonable loop, the following two tests should be eliminated based on contextual information, if our compiler is optimizing enough.
< rotate left 1
Corner case: shift by >= 64 bits is not defined in C. gcc had better constant-fold this to a rotate! (It appears to.) We inline in large part to ensure the truthiness of this fact.
rotate left by shift (equiv to rotating left n times).
bool net_instaweb::OptimizeWebp | ( | const GoogleString & | original_jpeg, | |
GoogleString * | compressed_webp | |||
) |
Optimizer in the style of pagespeed/image_compression/jpeg_optimizer.h that creates a webp-formatted image in compressed_webp from the jpeg image in original_jpeg. Indicates failure by returning false, in which case compressed_webp may be filled with junk.
bool net_instaweb::ParseContentType | ( | const StringPiece & | content_type_str, | |
GoogleString * | mime_type, | |||
GoogleString * | charset | |||
) |
Extracts mime_type and charset from a string of the form "<mime_type>; charset=<charset>". If mime_type or charset is not specified, they will be populated with the empty string. Returns true if either a mime_type or a charset was extracted.
bool net_instaweb::ParseDataUrl | ( | const StringPiece & | url, | |
const ContentType ** | content_type, | |||
Encoding * | encoding, | |||
StringPiece * | encoded_content | |||
) |
Dismantle a data: url into its component pieces, but do not decode the content. Note that encoded_content will be a substring of the input url and shares its lifetime. Invalidates all outputs if url does not parse.
void net_instaweb::ParseShellLikeString | ( | const StringPiece & | input, | |
std::vector< GoogleString > * | output | |||
) |
Given a string such as: a b "c d" e 'f g' Parse it into a vector: ["a", "b", "c d", "e", "f g"]
bool net_instaweb::ReduceWebpImageQuality | ( | const GoogleString & | original_webp, | |
int | quality, | |||
GoogleString * | compressed_webp | |||
) |
Reduce the quality of the webp image. Indicates failure by returning false. WebP quality varies from 1 to 100. Original image will be returned if input quality is <1.
apr_status_t net_instaweb::save_url_hook | ( | request_rec * | request | ) |
Save the original URL as a request "note" before mod_rewrite has a chance to corrupt mod_pagespeed's generated URLs, which would prevent instaweb_handler from being able to decode the resource.
void net_instaweb::SlurpUrl | ( | ApacheResourceManager * | manager, | |
request_rec * | r | |||
) |
Loads the URL based on the fetchers and other infrastructure in the factory.
void net_instaweb::SplitStringPieceToVector | ( | const StringPiece & | sp, | |
const StringPiece & | separators, | |||
StringPieceVector * | components, | |||
bool | omit_empty_strings | |||
) |
Split sp into pieces that are separated by any character in the given string of separators, and push those pieces in order onto components.
void net_instaweb::SplitStringUsingSubstr | ( | const GoogleString & | full, | |
const GoogleString & | substr, | |||
StringVector * | result | |||
) |
Splits string 'full' using substr by searching it incrementally from left. Empty tokens are removed from the final result.
GoogleString net_instaweb::StrCat | ( | const StringPiece & | a, | |
const StringPiece & | b, | |||
const StringPiece & | c = EmptyString::kEmptyString , |
|||
const StringPiece & | d = EmptyString::kEmptyString , |
|||
const StringPiece & | e = EmptyString::kEmptyString , |
|||
const StringPiece & | f = EmptyString::kEmptyString , |
|||
const StringPiece & | g = EmptyString::kEmptyString , |
|||
const StringPiece & | h = EmptyString::kEmptyString | |||
) |
bool net_instaweb::StringEqualConcat | ( | const StringPiece & | str, | |
const StringPiece & | first, | |||
const StringPiece & | second | |||
) |
Return true if str is equal to the concatenation of first and second. Note that this respects case.
bool net_instaweb::StringToInt | ( | const char * | in, | |
int * | out | |||
) | [inline] |
NOTE: For a string of the form "45x", this sets *out = 45 but returns false. It sets *out = 0 given "Junk45" or "".
bool net_instaweb::StringToInt64 | ( | const char * | in, | |
int64 * | out | |||
) | [inline] |
bool net_instaweb::StripUtf8Bom | ( | StringPiece * | contents | ) |
Strips any initial UTF-8 BOM (Byte Order Mark) from the given contents. Returns true if a BOM was stripped, false if not.
In addition to specifying the encoding in the ContentType header, one can also specify it at the beginning of the file using a Byte Order Mark.
Bytes Encoding Form 00 00 FE FF UTF-32, big-endian FF FE 00 00 UTF-32, little-endian FE FF UTF-16, big-endian FF FE UTF-16, little-endian EF BB BF UTF-8 See: http://www.unicode.org/faq/utf_bom.html
char net_instaweb::UpperChar | ( | char | c | ) | [inline] |
See also: ./src/third_party/css_parser/src/strings/ascii_ctype.h We probably don't want our core string header file to have a dependecy on the Google CSS parser, so for now we'll write this here: upper-case a single character and return it. toupper() changes based on locale. We don't want this!
const char net_instaweb::kGaSnippetSuffix[] |
" ];\n" " var pageTracker = {\n" " initData: function() {},\n" " };\n" " for (var i=pageTrackerMethodNames.length; i--;) {\n" " var n = pageTrackerMethodNames[i];\n" " pageTracker[n] = deferTrackerFunc(prefix + n);\n" " }\n" " return pageTracker;\n" " };\n" "\n" " var ga = document.createElement('script');\n" " ga.type = 'text/javascript'; ga.async = true;\n" " ga.src = ('https:' == document.location.protocol ? 'https:///ssl' :\n" " 'http:///www') + '.google-analytics.com/ga.js';\n" " var s = document.getElementsByTagName('script')[0];\n" " s.parentNode.insertBefore(ga, s);\n" "})();\n"
const uint64 net_instaweb::kRollingHashCharTable[256] |
Per character hash values. Exported for use in NextRollingHash.
Rolling hash for char buffers based on a polynomial lookup table. See http://en.wikipedia.org/wiki/Rolling_hash
const int net_instaweb::kStackBufferSize = 10000 |
Size of stack buffer for read-blocks. This can't be too big or it will blow the stack, which may be set small in multi-threaded environments.