The mojo identity service (//services/identity) is not used in
production. However, a variety of chrome code uses the typedef
identity::ScopeSet when talking to the C++ IdentityManager and
related auth-token code.
Introduce signin::ScopeSet for these use cases. It's just a
copy of identity::ScopeSet, which is a std::set<std::string>.
I didn't eliminate identity::ScopeSet in this CL due to existing
usage in //services/identity as well as typemapping code.
I'll delete the identity::ScopeSet version when I delete the
rest of the identity service.
TBR=rockot@chromium.orgTBR=droger@chromium.org
Bug: none
Change-Id: Ib938f08763eda81de22a1a79b460011e012a81ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076426
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745049}
`gn format` recently changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.
Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.
This CL was uploaded by me.
Bug: 1041419
Change-Id: I4dc096337fe543a8ff2d027d95323f521989000f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007768
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732860}
Migrates some directories off of deprecated base::Bind, base::Callback,
etc, and onto the newer APIs.
Specifically this covers components/ntp_snippets/
Fixed: 1007707
Change-Id: I309dfebb2306bbae5536fe526e5522ddab5e57b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1977839
Reviewed-by: Patrick Noland <pnoland@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#726855}
Several tests were using testing::CreateFunctor unnecessarily.
gmock's testing::Invoke() already supports a function pointer
as an argument. This change simplifies the tests and upcoming
refactoring to the functor implementation in gmock_mutant.h.
Bug: 1007833, 806952
Change-Id: Ifca2fdc2364b770761f2da9f6d2b36a95b5c1547
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874050
Reviewed-by: Filip Gorski <fgorski@chromium.org>
Commit-Queue: Chris Mumford <cmumford@google.com>
Cr-Commit-Position: refs/heads/master@{#708377}
This change replaces usages of base::Value::GetList() followed by either
emplace_back() or push_back() with base::Value::Append(). This is
because of the upcoming change to GetList() to return a base::span
instead, which does not support either emplace_back() or push_back().
This is a completely mechanical change. Steps to reproduce:
- sed -i 's/GetList().push_back/Append/g'
- sed -i 's/GetList().emplace_back/Append/g'
- git cl format
Bug: 646113
Change-Id: Ia29bc02040a056e518737f2b11f1cd0b66b0e0f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796430
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695530}
These tests were previously migrated from single-threaded MessageLoop to
a multi-threaded TaskEnvironment (then named ScopedTaskEnvironment) as
part of crbug.com/891670.
//base OWNERS decided in retrospect that it was better to keep a
single-threaded option for TaskEnvironment and introduced
SingleThreadTaskEnvironment. This CL retrofits that decision for
/components/ntp_snippets.
This CL is a no-op if it passes CQ.
This CL was uploaded by git cl split.
R=noyau@chromium.org
Bug: 891670
Change-Id: Ib3206c1a7c5241a2f8f6d515f7f321be5058519f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787205
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Eric Noyau <noyau@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695326}
This is a reland of 18947083c7
The move_source_file.py script's formatting rules incorrectly
formatted services/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
after all. But we also can't rely 100% on git cl format (crbug.com/997063)
so I ended up performing a git cl format && git add -up
(+interactive addition of missing blank line after foo.h when included
from top of foo.cc)
Also added
$ tools/git/move_source_file.py net/test/test_with_scoped_task_environment.h net/test/test_with_task_environment.h
Original change's description:
> [TaskEnvironment] Complete migration with header rename
>
> This is merely:
>
> $ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
> $ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
> $ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
> $ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
> $ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
>
> and a few manual renames in DEPS files missed by the script
>
> This CL uses --bypass-hooks to avoid having to git cl format because
> many headers are being reordered by git cl format and it's too many to
> figure out in a no-op CL which ones are okay with it.
> windows.h for one should typically be first and another one of the
> reorderings in PS3 even caused a compile failure:
> https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.cc
>
> TBR=dcheng@chromium.org
>
> Bug: 992483
> Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#689778}
TBR=dcheng@chromium.org
Bug: 992483
Change-Id: I6179dd1329a4d30bf5c65450ea893537f31e6f85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1767658
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689794}
This reverts commit 18947083c7.
Reason for revert: broke Win
Original change's description:
> [TaskEnvironment] Complete migration with header rename
>
> This is merely:
>
> $ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
> $ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
> $ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
> $ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
> $ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
>
> and a few manual renames in DEPS files missed by the script
>
> This CL uses --bypass-hooks to avoid having to git cl format because
> many headers are being reordered by git cl format and it's too many to
> figure out in a no-op CL which ones are okay with it.
> windows.h for one should typically be first and another one of the
> reorderings in PS3 even caused a compile failure:
> https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.cc
>
> TBR=dcheng@chromium.org
>
> Bug: 992483
> Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#689778}
TBR=dcheng@chromium.org,gab@chromium.org
Change-Id: I9aa8ff558d1ff78cebe0c25e559c017578ad4f53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 992483
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1767657
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689780}
This is merely:
$ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
$ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
$ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
$ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
$ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
and a few manual renames in DEPS files missed by the script
This CL uses --bypass-hooks to avoid having to git cl format because
many headers are being reordered by git cl format and it's too many to
figure out in a no-op CL which ones are okay with it.
windows.h for one should typically be first and another one of the
reorderings in PS3 even caused a compile failure:
https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.ccTBR=dcheng@chromium.org
Bug: 992483
Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689778}
JsonRequest::Builder::SetAuthentication gets CoreAccountId as a parameter
from identity_manager. CoreAccountId is its own stand alone class and
should not be interchangeable with std::string.
Bug: 959157
Change-Id: I5704a54c9c62e0eb1fc2463f0ba7089cc298d650
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1735158
Reviewed-by: Eric Noyau <noyau@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685959}
*** Note: There is no behavior change from this patch. ***
The PostTask APIs will shortly be changed to require all tasks to explicitly
specify their thread affinity, i.e., whether the task should run on the thread
pool or a specific named thread such as a BrowserThread. This patch updates all
call sites with thread affinity annotation. We also remove the "WithTraits"
suffix to make the call sites more readable.
Before:
// Thread pool task.
base::PostTaskWithTraits(FROM_HERE, {...}, ...);
// UI thread task.
base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI, ...}, ...);
After:
// Thread pool task.
base::PostTask(FROM_HERE, {base::ThreadPool(), ...}, ...);
// UI thread task.
base::PostTask(FROM_HERE, {BrowserThread::UI, ...}, ...);
This patch was semi-automatically prepared with these steps:
1. Patch in https://chromium-review.googlesource.com/c/chromium/src/+/1635827
to make thread affinity a build-time requirement.
2. Run an initial pass with a clang rewriter:
https://chromium-review.googlesource.com/c/chromium/src/+/1635623
3. ninja -C out/Debug | grep 'requested here' | cut -d: -f1-3 | sort | \
uniq > errors.txt
4. while read line; do
f=$(echo $line | cut -d: -f 1)
r=$(echo $line | cut -d: -f 2)
c=$(echo $line | cut -d: -f 3)
sed -i "${r}s/./&base::ThreadPool(),/$c" $f
done < errors.txt
5. GOTO 3 until build succeeds.
6. Remove the "WithTraits" suffix from task API call sites:
$ tools/git/mffr.py -i <(cat <<EOF
[
["PostTaskWithTraits", "PostTask"],
["PostDelayedTaskWithTraits", "PostDelayedTask"],
["PostTaskWithTraitsAndReply", "PostTaskAndReply"],
["CreateTaskRunnerWithTraits", "CreateTaskRunner"],
["CreateSequencedTaskRunnerWithTraits", "CreateSequencedTaskRunner"],
["CreateUpdateableSequencedTaskRunnerWithTraits", "CreateUpdateableSequencedTaskRunner"],
["CreateSingleThreadTaskRunnerWithTraits", "CreateSingleThreadTaskRunner"],
["CreateCOMSTATaskRunnerWithTraits", "CreateCOMSTATaskRunner"]
]
EOF
)
This CL was uploaded by git cl split.
R=blundell@chromium.org
Bug: 968047
Change-Id: Ie7157527c1c36286c321800db5ecac024e8124c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728557
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683238}
Currently LargeIconService allows callers to decide the size of the
favicon they wish to download from the favicon server. Depending on
which UI surface the user opens first, a different size is downloaded,
which can cause displaying upscaled icons and decrease in quality. We
solve this by downloading a single sufficiently big size (chosen based
on existing values used by callers), aiming to only have downscaling.
Bug: 982810
Change-Id: Ibad636d4c4d63791e9eb62d99221d9f35c9cb375
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1695268
Commit-Queue: Victor Vianna <victorvianna@google.com>
Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Kristi Park <kristipark@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: edchin <edchin@chromium.org>
Reviewed-by: Nicolas Zea <zea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681751}
This CL hides ClientPolicyController, and makes it a singleton. Access to
policy data is now provided through regular functions.
ClientPolicyController was already immutable, so making it a proper singleton
is just a mechanical change. This has a benefit that we no longer construct
multiple copies of ClientPolicyController, and no longer need to thread it
through so many interfaces.
A potential downside is that injecting fake policies for testing would have been
easier before this change. However, there's still several ways to do it, and
we haven't yet found a need for this.
Bug: 883559
Change-Id: I5b0919f9d91d91c53d9897b8469f9031d45c6996
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1678780
Commit-Queue: Dan H <harringtond@chromium.org>
Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
Reviewed-by: Patrick Noland <pnoland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680061}
No caller of CreateForMobile sets this field above 16px, which is the
minimal value enforced by LargeIconService, so in fact all mobile UIs
that download from the favicon server use this default value. Behavior
is not changed for them.
For desktop UIs, this CL decouples the minimum_size from desired_size,
keeping the desired size of 16 DIP while decreasing the minimum size to
16px. We argue that this is beneficial for the UI because it improves
availability of icons. If any desktop UI in the future needs to enforce
the minimum size to display, it can do so when loading the icon from
local cache.
Bug: 982810
Change-Id: I1160316e93fd721cc977833aa9635d40971a2da6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1695366
Reviewed-by: Nicolas Zea <zea@chromium.org>
Reviewed-by: edchin <edchin@chromium.org>
Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Kristi Park <kristipark@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Jan Krcal <jkrcal@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/master@{#678736}
Using this regex:
(base::)?(test::)?ScopedTaskEnvironment::[\s\n]*MainThreadType::[\s\n]*(UI|IO)?_?MOCK_TIME
and mapping it to:
\1\2ScopedTaskEnvironment::MainThreadType::\3, \1\2ScopedTaskEnvironment::TimeSource::MOCK_TIME
and then deleting any
(base::)?(test::)?ScopedTaskEnvironment::MainThreadType::,
left behind + git cl format
Will TBR fdoray@ for mechanical change after LGTM
TBR=fdoray@chromium.org
Bug: 946657
Change-Id: I0ec0e9a307c629fcee6816b5443d37a7ab90c0d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1702461
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677822}
As per-platform differences are now separated out at a deeper level
(per-platform DnsConfigService inside SystemDnsConfigChangeNotifier),
unified the DNS config stuff to be located directly in
NetworkChangeNotifier rather than in per-platform subclasses. Required
some minor fixes to mock NCN usage, especially custom mocks that were
overriding NCN and now getting full DNS config changes (and added env
threading requirements that those tests were not setup to handle).
For now, HostResolverManager is still listening through
NetworkChangeNotifier. It will be updated to directly use
SystemDnsConfigChangeNotifier in the next CL.
Bug: 971411
Change-Id: Ib0353041dbf60f311e993eb98f8d4b719ce0d2e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1666288
Commit-Queue: Eric Orth <ericorth@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Sky Malice <skym@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Reviewed-by: Nicolas Zea <zea@chromium.org>
Reviewed-by: Asanka Herath <asanka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675813}
IdentityManager currently lives under //services/identity/public/cpp. Given
the evolution of the Identity Service which is backed by IdentityManager, with
IdentityManager being used directly by the browser, this code location no
longer makes sense.
This CL performs the following relocations:
* Public header files (e.g. identity_manager.h, access_token_fetcher.h), their
implementations, and their unittests will move to
//components/signin/public/identity_manager.
* Non-public headers, their implementations, and their unittests will move to:
//components/signin/internal/identity_manager.
Design doc:
https://docs.google.com/document/d/1MiZmqvDFVcCOseAuViJqd8wLDILbykarX7PfwleNpAsTBR=jochen@chromium.org,rockot@google.com,antrim@chromium.org
Bug: 952788
Change-Id: Ied8992f966f7373443fbb76b177ad4d71832145d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1669293
Reviewed-by: Henrique Ferreiro <hferreiro@igalia.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/master@{#674455}
ScopedFeatureList is the preferred helper for setting up testing
feature params.
In addition to pure test changes, hats_finch_helper.cc is updated
to use the feature param APIs as opposed to variation params, so
that the params are associated with a feature and not a specific
field trial name. This is the best practice and also allows the
test to use ScopedFeatureList since the trial name it sets up is
not the feature name.
Bug: 974436
Change-Id: I39e763db246c88de7e4487439bc257f64c160064
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1655086
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Justin DeWitt <dewittj@chromium.org>
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Parastoo Geranmayeh <parastoog@google.com>
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Reviewed-by: Collin Baker <collinbaker@chromium.org>
Reviewed-by: Jared Saul <jsaul@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Malay Keshav <malaykeshav@chromium.org>
Reviewed-by: Patrick Noland <pnoland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671024}
This change replaces usages of base::ContainsKey() and
base::ContainsValue() with base::Contains() in //components.
Reproduction:
- sed -i 's/\bbase::ContainsKey\b/base::Contains/g'
- sed -i 's/\bbase::ContainsValue\b/base::Contains/g'
- git cl format
This CL was uploaded by git cl split.
TBR=dvadym,danakj,droger,thestig,nparker,gogerald,vasilii,blundell
Bug: 970209
Change-Id: I123f52d739968fd2dc32859116f6d228dbda2568
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648226
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667447}
See crrev.com/c/1590404 and the linked bug for context -- the goal is to
fix the broken memory-leak checking in Chromium's ASAN
(AddressSanitizer) trybots, which are supposed to also run LSAN
(LeakSanitizer).
Currently-leaking tests must be fixed or disabled before leak checking
can be enabled in the ASAN trybot.
WARNING: This will result in a loss of ASAN coverage for the affected
tests given that LSAN runs as part of the ASAN trybot.
If that's not acceptable, we can wait until the leaks are fixed before
fixing leak detection in trybots, but keep in mind that newly-introduced
leaks Chromium-wide won't be caught until then.
Bug: 961023
Change-Id: I1899fbea3d1ce8288c954c97d4d486bd3cda3371
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638818
Commit-Queue: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: Jared Saul <jsaul@google.com>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Reviewed-by: Patrick Noland <pnoland@chromium.org>
Reviewed-by: Robert Ogden <robertogden@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666059}
The callback passed to SafeJsonParser will only be invoked once, so
change the definition of the callbacks to be base::OnceCallback<>
to make this explicit.
Convert client code to use base::BindOnce() when interacting with
SafeJsonParser instead of base::Bind() or base::BindRepeating().
TBR=sky@chromium.org
Bug: 842655, 964232, 714018
Change-Id: Id948c848f5c193959cc0da2c8eadb21cc55a841c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1624810
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664288}
We add a new parameter to LargeIconService's method
GetLargeIconOrFallbackStyleFromGoogleServerSkippingLocalCache to allow
querying the server by an url with trimmed path. No behavior is changed
in the existent callers.
Bug: 955475
Change-Id: I0741aed7d3a54f863f9afe9c35ce8dfc6d2bb5b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1621923
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Nicolas Zea <zea@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/master@{#663528}
The documentation on base::Callback<...> (src/docs/callback.md)
recommends against using base::Passed(...) with base::BindOnce.
> Avoid using `base::Passed()` with `base::BindOnce()`, as `std::move()`
> does the same thing and is more familiar.
This CL was uploaded by git cl split.
Bug: 812523
Change-Id: I29cf2bede8555b73962acd62b6a0b56ebaba8bc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611834
Commit-Queue: Nicolas Zea <zea@chromium.org>
Reviewed-by: Patrick Noland <pnoland@chromium.org>
Reviewed-by: Nicolas Zea <zea@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662676}
allow_credentials, removing HTTP authentication data.
This CL is part of a larger project to remove the LOAD_DO_NOT_* privacy load
flags and replace them with the allow_credentials setting. See
https://crbug.com/799935,
https://docs.google.com/document/d/1ntn9N7Ce2jozvvpWI0XbzJ7lJdwUjJXK07wp7rxrIN4,
and
go/allow-credentials-tracker
for the motivation and progress of this change.
This CL handles a third of cases where LOAD_DO_NOT_SEND_COOKIES and
LOAD_DO_NOT_SAVE_COOKIES were set, but LOAD_DO_NOT_SEND_AUTH_DATA was not.
This CL will set allow_credentials = false instead, which will make two
changes to the requests:
- The request will no longer participate in HTTP auth if the server requests
it. HTTP auth credentials identify the user, so private requests should
not send them. Note this only affects server auth, not proxy auth. Unless
the server your feature speaks to requests HTTP auth, this is a no-op.
- The request will be pooled with sockets used for uncredentialed requests,
rather than credentialed requests. This is not expected to meaningfully
change behavior.
If your code requires HTTP authentication, let me know. You may need to
allow credentials for your request.
Bug: 799935
Change-Id: Iaa33d56644b53f77701a8254fe7eb2b952eb0f18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1580589
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Patrick Noland <pnoland@chromium.org>
Reviewed-by: Cait Phillips <caitkp@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Reviewed-by: rajendrant <rajendrant@chromium.org>
Reviewed-by: Jian Li <jianli@chromium.org>
Commit-Queue: Jesse Selover <jselover@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660170}
The base::Value API redesign goal is to avoid passing base::Value
via std::unique_ptr<base::Value> but instead to pass it by value.
Change ntp_snippets::SuccessCallback to follow this pattern.
Convert use of deprecated base::JSONReader::ReadToValueDeprecated
method.
Bug: 646113
Change-Id: I428be08fce1ccd3e25fd1b3af133ce7492984552
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1594589
Reviewed-by: Nicolas Zea <zea@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658180}