Add PrefStore::GetValues

Currently there's no way to proxy a PrefStore, which we need to
in the new prefs service, because there's no way to get its
initial state. The existing observer interface can only be used
to get changed values and GetValue requires that you know all the
keys in advance.

GetValues involve a deep copy, but the intended consumer needs to
take ownership to send the value over the wire anyway.

Design doc: https://docs.google.com/document/d/1Fj013SXClTzk4Yfq2eoL9OkKfN0h-GLXPAokCXFkcTY/edit?usp=sharing

BUG=654988

Review-Url: https://codereview.chromium.org/2692203007
Cr-Commit-Position: refs/heads/master@{#451691}
Committed: https://chromium.googlesource.com/chromium/src/+/311d4a192239299e42e66b1319b19ee58a5a4b06
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester

Review-Url: https://codereview.chromium.org/2692203007
Cr-Commit-Position: refs/heads/master@{#452336}
diff --git a/components/prefs/default_pref_store.cc b/components/prefs/default_pref_store.cc
index 468c11c..0e9c87c 100644
--- a/components/prefs/default_pref_store.cc
+++ b/components/prefs/default_pref_store.cc
@@ -17,6 +17,10 @@
   return prefs_.GetValue(key, result);
 }
 
+std::unique_ptr<base::DictionaryValue> DefaultPrefStore::GetValues() const {
+  return prefs_.AsDictionaryValue();
+}
+
 void DefaultPrefStore::AddObserver(PrefStore::Observer* observer) {
   observers_.AddObserver(observer);
 }