Title: Theory / Important / Chrome / C++ / Base

Typ: logging::VlongInfo
Meaning: Settings for vlogging
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/vlog.h

Typ: base::Version
Meaning: Version represents a dotted version number, like "1.2.3.4", supporting parsing and comparison.
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/vlog.h

Instruction: base::Version(str)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/version.h
Returns: The Version number from the string

Instruction: version.IsValid()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/version.h
Returns: Whether this corresponds to a valid version number
Variables: base::Version version

Instruction: version_a.CompareTo(version_b)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/version.h
Returns: -1, 0, +11 depending on wheither version_a <, ==, > version_b
Variables: base::Version version_a, version_b

Instruction: version.GetString()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/version.h
Returns: The dotted version as a string
Variables: base::Version version;

Instruction: version.CompareToWildcardString(string)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/version.h
Returns: Whether string would result in a newer version
Variables: base::Version version;

Instruction: Version::IsValidWildcardString(string)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/version.h
Returns: Whether string is a valid version number, potentially ending with .*

Instruction: version.components()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/version.h
Returns: The vector of components of this version number
Variables: base::Version version

Typ: base::Value
Meaning: JSON equivalent in c++. Plus blob as base type
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/values.h

Instruction: value.GetType()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/values.h
Language: C++
Context: Chrome
Returns: Value, as Type&. Or fail.
Variables: base::Value value

Instruction: value.GetIfType()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/values.h
Language: C++
Context: Chrome
Returns: Value, as absl::Optional<Type&>
Variables: base::Value value

Typ: base::Value::List
Meaning: Lists of base::Value
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/values.h
Language: C++
Context: Chrome
Variables: base::Value value

Typ: base::Value::Dict
Meaning: Dict of base::Value
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/values.h
Language: C++
Context: Chrome
Variables: base::Value value

Instruction: value.is_type()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/values.h
Language: C++
Context: Chrome
Returns: Whether value's type is type
Variables: base::Value value

Instruction: value.GetType()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/values.h
Language: C++
Context: Chrome
Returns: Value, as Type. Or fail. Transfer ownership
Variables: base::Value value

Instruction: base::DispatchToFunction(&func, tuple);
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/tuple.h
Language: C++
Context: Chrome
Returns: func(tuple[0], ..., tuple[n-1])
Variables: std::Tuple<type_1, …, type_n> tuple(val_0, …, val_{n-1});

Instruction: base::DispatchToMethod(&object, &object::method, tuple);
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/tuple.h
Language: C++
Context: Chrome
Returns: object->method(tuple[0], ..., tuple[n-1])
Variables: std::Tuple<type_1, …, type_n> tuple(val_0, …, val_{n-1});

Typ: base::Token
Meaning: Randomly chosen 128-bit integers
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/token.h
Language: C++
Context: Chrome

Instruction: base::Token()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/token.h
Language: C++
Context: Chrome
Returns: The 0 token

Instruction: base::Token::CreateRandom()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/token.h
Language: C++
Context: Chrome
Returns: A non-0 random token from cryptographically strong random source

Instruction: todo: traits_bag
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/traits_bag.h
Language: C++
Context: Chrome

Instruction: todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/thread_annotations.h
Language: C++
Context: Chrome

Instruction: todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/template_util.h
Language: C++
Context: Chrome

Instruction: base::ByteSwap(x)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/sys_byteorder.h
Language: C++
Context: Chrome
Returns: Reverse the bytes in `x`

Instruction: base::ByteSwapToLE16|32|64(x)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/sys_byteorder.h
Language: C++
Context: Chrome
Returns: Swap x to little endian
Assuming: x is system endianness

Instruction: base::NetToHost16|32|64(x)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/sys_byteorder.h
Language: C++
Context: Chrome
Returns: Swap x to host endianness
Assuming: x is network endianness

Instruction: base::HostToNet16|32|64(x)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/sys_byteorder.h
Language: C++
Context: Chrome
Returns: Swap x to network endianness
Assuming: x is host endianness

Instruction: todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/sync_socket.h
Language: C++
Context: Chrome

Instruction: todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/supports_user_data.h
Language: C++
Context: Chrome

Instruction: todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stl_util.h
Language: C++
Context: Chrome

Instruction: todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/state_transitions.h
Language: C++
Context: Chrome

Instruction: base::ResetSTackCanaryIfPossible()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Effect: resets the reference stack canary to a new random value
Language: C++
Context: Chrome

Instruction: base::SetStackSmashingEmitsDebugMessage()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Effect: After this is called, any canary mismatch is considered to be due to a change in the reference canary (see ResetStackCanaryIfPossible()) rather than a stack corruption
Language: C++
Context: Chrome

Instruction: base::SequenceToken()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Language: C++
Context: Chrome
Returns: An invalid sequence token

Instruction: base::SequenceToken::Create()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Language: C++
Context: Chrome
Returns: A valid sequence token

Instruction: sequence_token::IsValid()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Language: C++
Context: Chrome
Returns: Whether the token is valid
Variables: base::SequenceToken sequence_token

Instruction: sequence_token::ToInternalValue()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Language: C++
Context: Chrome
Returns: A unique id for the token, for debugging purpose
Variables: base::SequenceToken sequence_token

Instruction: base::TaskToken()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Language: C++
Context: Chrome
Returns: An invalid task token

Instruction: base::TaskToken::GetForCurrentThread()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Language: C++
Context: Chrome
Returns: In the scope of a ScopedSetSequenceTokenForCurrentThread, returns a valid TaskToken which isn't equal to any TaskToken returned in the scope of a different ScopedSetSequenceTokenForCurrentThread. Otherwise, returns an invalid TaskToken.

Instruction: base::SequenceToken::GetForCurrentThread()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Language: C++
Context: Chrome
Returns: the SequenceToken associated with the task running on the current thread, as determined by the active ScopedSetSequenceTokenForCurrentThread if any.

Typ: base::SequenceToken
Meaning: A token that identifies a series of sequenced tasks
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Language: C++
Context: Chrome
Extra: (i.e. tasks that run one / at a time in posting order).

Typ: base::TaskToken
Meaning: A token that identifies a task.
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Language: C++
Context: Chrome

Typ: base::ScopedSetSequenceTokenForCurrentThread
Meaning: Instantiate this in the scope where a single task runs.
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/stack_canary_linux.h
Language: C++
Context: Chrome

Typ: todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/sequence_checker_impl.h
Language: C++
Context: Chrome

Typ: ScopedGeneric<T, TScopedTrait>
Meaning: A version of `T`, where `TScopedTrait` allors to free, track ownership and release
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/scoped_generic.h
Language: C++

Instruction: base::ScopedEnvironmentVariableOverride(variable_name, value)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/scoped_environment_variable_override.h
Effect: While this object exists, the environment variable variable_name has value
Language: C++

Instruction: base::ScopedClearLastError()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/scoped_clear_last_error.h
Effect: Wthen this object is destructed, thread local error codes gets set back to its value when the object was created
Language: C++

Instruction: run_loop.Run()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/run_loop.h
Effect: Blocks until run_loop.Quit() is called
Language: C++
Variables: base::RunLoop run_loop

Instruction: run_loop.Quit()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/run_loop.h
Effect: Allows run_loop.Run() to returns as soon as possible
Language: C++
Variables: base::RunLoop run_loop

Instruction: RandFloatType()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/rand_util.h
Effect: A random number in [0, 1) of type Floattype
Language: C++

Instruction: RandIntegralType()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/rand_util.h
Effect: A random non-negative digit of IntegralType
Language: C++

Instruction: RandGenerator(n)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/rand_util.h
Effect: Return a random int in [0, n]
Language: C++

Instruction: RandInt(min, max)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/rand_util.h
Effect: A random number in [min, max]
Language: C++

Instruction: BitsToOpenEndedUnitIntervalF(bits)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/rand_util.h
Effect: A double/float whose bits are as close as possible to bits
Language: C++

Instruction: RandBytes(void* output, size_t output_length);
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/rand_util.h
Effect: fills output_length bytes of output with random bits
Language: C++

Instruction: RandBytesAsString(length);
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/rand_util.h
Effect: A string of length filled with random bytes
Language: C++

Typ: base::InsecureRandomGenerator
Meaning: A random generator quick and unsecure
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/rand_util.h
Language: C++

Typ: base::PickleIterator
Meaning: Allows to read data from a Pickle
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/pickle.h
Language: C++

Typ: base::PendingTask
Meaning: Contains data about a pending task for TaskQueue or DelayedTaskQueue
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/pending_task.h
Language: C++

Typ: base::PathService
Meaning: Map from keys to file system paths
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/path_service.h
Language: C++

Instruction: base::any_of(ilist)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/parameter_pack.h
Effect: Whether ilist contains a true element
Language: C++

Instruction: base::all_of(ilist)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/parameter_pack.h
Effect: Whether ilist contains only true
Language: C++

Instruction: base::Contains(ilist, elt)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/parameter_pack.h
Effect: Whether ilist contains elt
Language: C++

Instruction: base::count(ilist, elt)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/parameter_pack.h
Effect: Number of occurences of elt in ilist
Language: C++

Instruction: pack::HasType<T>()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/parameter_pack.h
Effect: Whether T occurs as a type of the pack
Language: C++
Variables: base::ParameterPack<Type_1, ..., Type_n> pack

Instruction: pack::OnlyHasType<T>()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/parameter_pack.h
Effect: Whether T is the only type in the pack
Language: C++
Variables: base::ParameterPack<Type_1, ..., Type_n> pack

Instruction: pack::IsUniqueInPack<T>()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/parameter_pack.h
Effect: Whether T occurs only once in pack
Language: C++
Variables: base::ParameterPack<Type_1, ..., Type_n> pack

Instruction: pack::IndexInPack<T>()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/parameter_pack.h
Effect: Index of the first occurrence of T in the pack, or pack_npos
Language: C++
Variables: base::ParameterPack<Type_1, ..., Type_n> pack

Instruction: pack::NthType<i>()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/parameter_pack.h
Effect: The i type of the pack, Type_i
Language: C++
Variables: base::ParameterPack<Type_1, ..., Type_n> pack

Instruction: pack::IsAllSameType()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/parameter_pack.h
Effect: Whether the pack contains a single type
Language: C++
Variables: base::ParameterPack<Type_1, ..., Type_n> pack

Typ: base::OneShotEvent
Meaning: An object that retains and blocks tasks until a specific event occurs
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/one_shot_event.h

Instruction: base::OneShotEvent(true)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/one_shot_event.h
Returns: An event that is already signaled

Instruction: one_shot_event::is_signaled()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/one_shot_event.h
Returns: Whether the event is signaled
Variables: base::OneShotEvent one_shot_event

Instruction: one_shot_event::Signal()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/one_shot_event.h
Effect: Signals the event, starting all tasks stacked
Variables: base::OneShotEvent one_shot_event

Instruction: one_shot_event::Post(from_here, task)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/one_shot_event.h
Effect: Stack the task to one_shot_event and wait untils it is signaled to be executed
Variables: base::OneShotEvent one_shot_event

Instruction: one_shot_event::PostDelayed(from_here, task, delay)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/one_shot_event.h
Effect: Stack the task to one_shot_event, and start executing it delay after the signal
Variables: base::OneShotEvent one_shot_event

Typ: base::CheckedObserver
Meaning: An observer that CHECK fail if it is destroyed before being removed from all ObserverList
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/observer_list_types.h

Typ: base::ObserverListThreadSafe
Meaning: A thread-safe version of ObserverList
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/observer_list_threadsafe.h

Typ: base::ObserverList<ObserverType>
Meaning: A list of ObserverType, which can be edited during iteration
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/observer_list.h

Instruction: NOTREACHED()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/notreached.h
Effect: When executed, automatically fails a DCHECK()

Instruction: NOTIMPLEMENTED()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/notreached.h
Effect: When executed, automatically fails a DCHECK, stating this path is not implemented

Instruction: NOTIMPLEMNTED_LOG_ONCE()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/notreached.h
Effect: On first execution, fails a DCHECK, stating this path is not implemented. Ignore subsequent execution.

Typ: base::NoDestructor<T>
Meaning: Same as T, but can't be destructed
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/no_destructor.h
Language: C++
Intuition: Static local variables that can be constructed on first run

Question: When should base::NoDestructor<T> be used
Answer: T has non trivial destructor
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/no_destructor.h
Answer2: The data is often used
Answer3: In function-local static only

Question: todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/logging_win.h

Question: todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/native_library.h

Instruction: LOG(LEVEL) << string;
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h
Effect: Add string to log at LEVEL. Potentially open in a new window

Instruction: LOG_IF(LEVEL, predicate) << string;
DLOG_IF(LEVEL, predicate) << string;
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h
Effect: If predicate, adds string to log at LEVEL. Potentially open in a new window

Instruction: DLOG(LEVEL) << string;
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h
Effect: In debug mode, adds string to log at LEVEL. Potentially open in a new window

Instruction: VLOG(n) << string;
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h
Effect: Add info log level, shown with --v=n or more.

Instruction: VLOG_IS_ON(n);
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h
Returns: Whether VLOG is on for level n

Instruction: PLOG
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h
Effect: Same as LOG and append the last system error to the message in string form

Typ: base::Location
Meaning: Information about where an object was constructed, or was significantly brought to life
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/location.h

Instruction: base::GetLinuxDistro
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/linux_util.h
Returns: Name of the linux distro, or unknown

Instruction: TODO
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/linux_util.h

Instruction: TODO
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/lazy_instance_helpers.h

Typ: base::LazyInstance<T>
Meaning: a single instance of Type, which will be lazily created on the first time it's accessed.
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/lazy_instance.h
Extra: Use base::NoDestructor<Type> instead
Assuming: Old code only. Deprecated.

Instruction: TRAP_SEQUENCE_()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/immediate_crash.h
Effect: Crashes the fastest possible way

Instruction: FRIEND_TEST_ALL_PREFIXES(MyClassTest, TestMethod)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/gtest_prod_util.h
Effect: Ensures that MyClassTest::TestMethod remains a friend of current class, even when becoming flaky or disabled

Instruction: FORWARD_DECLARE_TEST(MyClassTest, TestMethod);
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/gtest_prod_util.h
Effect: Forward declare MYClassTest::TestMethod with all potential prefix for failing tests

Typ: base::GUID
Meaning: Allow to generate GUID
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/guid.h

Typ: TODO
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/format_macros.h

Typ: TODO
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/file_version_info_win.h mac and https://source.chromium.org/chromium/chromium/src/+/main:base/file_version_info.h

Typ: base::FileDescriptorSTore
Meaning: Associates keys to file descriptors
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/file_descriptor_store.h

Typ: TODO
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/file_descriptor_posix.h

Typ: TODO
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/export_template.h

Typ: base::Environment
Meaning: Represents the set of environment variables
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/environment.h

Instruction: environment->GetVar(name, &result)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/environment.h
Effect: Set result to the environment variable name
Returns: Whether the action
Variables: base::Environment* environment

Instruction: environment->HasVar(name)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/environment.h
Returns: Whether there is an environment variable with this name
Variables: base::Environment* environment

Instruction: environment->SetVar(name, value)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/environment.h
Effect: Set the environment variable name to value
Returns: Whether setting was successful
Variables: base::Environment* environment

Instruction: environment->UnSetVar(name)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/environment.h
Effect: Unset the environment variable name
Returns: Whether unsetting was successful
Variables: base::Environment* environment

Name: A managed device
Definition: an entity such as a company or school is applying policies to this device.
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/enterprise_util.h
Context: Chrome

Name: An enterprise device
Definition: the enterprise actually owns or has complete control over a device
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/enterprise_util.h
Context: Chrome

Instruction: base::IsManagedDevice()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/enterprise_util.h
Language: C++
Context: Chrome
Returns: Whether the device is managed
Name: i

Instruction: base::IsManagedOrEnterpriseDevice()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/enterprise_util.h
Language: C++
Context: Chrome
Returns: Whether the device is managed or enterprise

Instruction: base::IsEnterpriseDevice()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/enterprise_util.h
Language: C++
Context: Chrome
Returns: Whether the device is enterprise device

Instruction: DCHECK_IS_ON()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/dcheck_is_on.h
Language: C++
Context: Chrome
Returns: Whether DCHECK is on

Instruction: EXPENSIVE_DCHECKS_ARE_ON()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/dcheck_is_on.h
Language: C++
Context: Chrome
Returns: Whether expensive DCHECK is on

Instruction: Todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/cxx20_to_address.h
Language: C++
Context: Chrome

Instruction: Todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/cxx20_is_constant_evaluated.h
Language: C++
Context: Chrome

Instruction: Todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/critical_closure.h
Language: C++
Context: Chrome

Instruction: Todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/cpu_reduction_experiment.h
Language: C++
Context: Chrome

Instruction: Todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/cpu.h
Language: C++
Context: Chrome

Instruction: Todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/component_export.h
Language: C++
Context: Chrome

Typ: base::ComandLine
Meaning: Object to access the command line values
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Language: C++
Context: Chrome

Instruction: base::ComandLine(NO_PROGRAM)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Language: C++
Context: Chrome
Returns: A constructor for CommandLines that only carry switches and arguments.

Instruction: base::ComandLine(program)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Language: C++
Context: Chrome
Returns: a new command line with |program| as argv[0].

Instruction: base::ComandLine(argc, argv)
base::ComandLine(args)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Language: C++
Context: Chrome
Returns: a new command line from an argument list.

Instruction: base::ComandLine::Init(argc, argv)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Effect: Initialize the current process CommandLine singleton.
Language: C++
Context: Chrome

Instruction: base::ComandLine::Reset()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Effect: Destroys the current process CommandLine singleton
Language: C++
Context: Chrome

Instruction: base::ComandLine::ForCurrentProcess()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Language: C++
Context: Chrome
Returns: The CommandLine for the current process

Instruction: base::ComandLine::InitializedForCurrentProcess()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Language: C++
Context: Chrome
Returns: Whether the CommandLine has been initialized for the given process.

Instruction: command_line.GetArgumentsString()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Language: C++
Context: Chrome
Returns: the represented arguments string
Variables: base::ComandLine command_line
Assuming: Avoid on posix

Instruction: command_line.argv()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Language: C++
Context: Chrome
Returns: the original command line string as a vector of strings.
Variables: base::ComandLine command_line

Instruction: TODO: end this file
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h
Language: C++
Context: Chrome

Instruction: logging:CheckOpValueStr(v)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/check_op.h
Language: C++
Context: Chrome
Returns: A string representing v for logging purpose

Instruction: CHECK_EQ(val1, val2)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/check_op.h
Effect: Fails if (val1 == val2) is false. Prints both value in case of error
Language: C++
Context: Chrome

Instruction: CHECK_NE(val1, val2)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/check_op.h
Effect: Fails if (val1 != val2) is false. Prints both value in case of error
Language: C++
Context: Chrome

Instruction: CHECK_LE(val1, val2)
CHECK_GE(val1, val2)
CHECK_LT(val1, val2)
CHECK_GT(val1, val2)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/check_op.h
Effect: Fails if (val1 <=, >=, <, > val2) is false. Prints both value in case of error
Language: C++
Context: Chrome

Instruction: CHECK_IS_TEST()
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/check_is_test.h
Effect: Fails outside of tests
Language: C++
Context: Chrome

Instruction: CHECK_DEREF(ptr)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/check_is_test.h
Language: C++
Context: Chrome
Returns: Reference to *ptr, if it exists, dies otherwise

Instruction: base::BindOnce(fn, args...)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind.h
Language: C++
Context: Chrome
Returns: A OnceCallback that, on args', execute `fn(args, args')`

Instruction: base::BindRepeating(fn, args...)
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind.h
Language: C++
Context: Chrome
Returns: A RepeatingCallback that, on args', execute `fn(args, args')`

Name: Functor
Definition: A movable type representing something that should be called.
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind_internal.h
Chapter: A RepeatingCallback that, on args', execute `fn(args, args')`
Context: Chrome, base callback
Example: Functipon pointers
Example2: Callback<>

Name: RunType
Definition: A function type
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind_internal.h
Chapter: A RepeatingCallback that, on args', execute `fn(args, args')`
Context: Chrome, base callback
Counterexample: Function pointer

Name: (Bound)Args
Definition: A set of types that stores the arguments
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind_internal.h
Context: Chrome, base callback

Typ: ForceVoidReturn<>
Meaning: Helper class for translating function signatures to equivalent forms with a "void" return type.
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind_internal.h
Context: Chrome, base callback

Typ: FunctorTraits<>
Meaning: Type traits used to determine the correct RunType and invocation manner for a Functor
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind_internal.h
Context: Chrome, base callback

Typ: StorageTraits<>
Meaning: Type traits that determine how a bound argument is stored in BindState
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind_internal.h
Context: Chrome, base callback

Typ: InvokeHelper<>
Meaning: Take a Functor + arguments and actually invokes it.
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind_internal.h
Context: Chrome, base callback

Typ: Invoker<>
Meaning: Unwraps the curried parameters and executes the Functor.
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind_internal.h
Context: Chrome, base callback

Typ: BindState<>
Meaning: Stores the curried parameters, and is the main entry point into the Bind() system.
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/bind_internal.h
Context: Chrome, base callback

Question: What is prefered between OnceCallback and RepeatingCallback
Answer: Once callback. Ownership is simpler
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
Context: Chrome, base callback

Instruction: f.Then(g)
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
Context: Chrome, base callback
Returns: the OnceCallbacks such that Run(args) executes g.Run(f.Run(args))
Variables: base::OnceCallback f, g

Instruction: base::IgnoreResult(f)
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
Context: Chrome, base callback
Returns: A Callback executing same as f and returning void
Variables: base::OnceCallback f, g

Instruction: base::BindPostTask(runner, f)
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
Context: Chrome, base callback
Returns: A callback that runs f in runner
Variables: base::OnceCallback f

Instruction: base::SplitOnceCallback(f)
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
Context: Chrome, base callback
Returns: A pair of OnceCallback executing f. Only one of both can be run.
Variables: base::OnceCallback f

Typ: base::OnceCallback<T(T_1, ..., T_n)>
Meaning: A function that can be executed at most once, of type `T(T_1, ..., T_n)`
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/callback.h
Context: Chrome

Instruction: callback.IsCancelled()
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/callback.h
Context: Chrome
Returns: Whether the callback is cancelled
Variables: base::OnceCallback<T(T_1, ..., T_n)> callback

Instruction: callback.is_null()
Page: https://source.chromium.org/chromium/chromium/src/+/main:docs/callback.md
https://source.chromium.org/chromium/chromium/src/+/main:base/functional/callback.h
Context: Chrome
Returns: Whether the callback is null (has been moved)
Variables: base::OnceCallback<T(T_1, ..., T_n)> callback

Typ: OnceCLosure
Meaning: OnceCallback<void()>
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/functional/callback_forward.h
Context: Chrome

Typ: RepatingClosure
Meaning: RepaetingCallback<void()>
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/functional/callback_forward.h
Context: Chrome

Typ: TODO
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/functional/disallow_unretained.h
Context: Chrome

Typ: base::FunctionRef<R, Args...>
Meaning: A non-owning reference to any invocable object with Args returning R
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/functional/function_ref.h
Context: Chrome

Typ: Todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/functional/overloaded.h
Context: Chrome

Typ: base::CancelableOnceCallBack<args>
Meaning: Same as OnceCallback<args>, and can be cancelled
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/functional/overloaded.h
Context: Chrome

Typ: base::RepeatingCallbackList<type>
Meaning: A list of RepeatingCallback<type>, that can be edited during iteration
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/callback_list.h;l=18
Context: Chrome

Instruction: callback_list.Notify(args)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/callback_list.h;l=18
Effect: Execute elt.Run(args) for each element elt of callback_list
Context: Chrome
Variables: base::RepeatingCallbackList<type> callback_list

Instruction: callback_list.Add(callback)
Page: https://source.chromium.org/chromium/chromium/src/+/main:base/callback_list.h;l=18
Effect: Add `callback` to the callback_list
Context: Chrome
Variables: base::RepeatingCallbackList<type> callback_list