summaryrefslogtreecommitdiffstats
path: root/chrome/browser/policy
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Clean up net unit testing code." since it breaks the shlib builder.erg@google.com2011-01-251-1/+1
| | | | | | | | | | This reverts commit 006f377bbb65ece3490b7c76e58e0dc4cb330909 (r72562). BUG=68682 TEST=compiles TBR=thomasvl git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72564 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up net unit testing code.erg@google.com2011-01-251-1/+1
| | | | | | | | | | | | | | | | | - Move code included from blah_unittest.h (where blah_unittest.cc has actual unittests) into their own files, often completely out-of-lining the definitions. - Remove anonymous namespaces from headers. - Reorder method declarations. - Make other unit test link against net_test_support instead of reaching in and including .h files in their targets directly. BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6264013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72562 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce incognito preference settings.battre@chromium.org2011-01-251-92/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL introduces preference settings for incognito windows. The semantics are the following: - An extension can set regular preferences as before. These affect regular and incognito windows. - An extension can set regular preferences *and* incognito preferences. In this case, the incognito preferences affect only incognito windows. - If extension A sets reg+incognito, extension B sets reg but no incognito, extension B has higher precedence than A --> B's preferences hold for all regular and incognito windows. - Incognito preferences are never persisted to disk. In order to realize this, the ExtensionPrefs class allows setting regular and incognito extension controlled preferences. It allows creating an incognito version of the PrefService with an independent PrefValueStore. This (incognito) PrefValueStore and the original PrefValueStore share several of their PrefStores (i.e. DefaultPrefStore, CommandLinePrefStore, Configuration PrefStores) but differ in two pref stores: - We maintain two separate ExtensionPrefStores containing the effective preferences for regular and incognito windows. - We maintain two separate user pref stores. The regular JsonPrefStore is expanded by an OverlayPersistentPrefStore that maintains all write-operations in an in-memory overlay. Therefore, incognito changes are not visible in the file-backed JsonPrefStore. The two ExtensionPrefStores retrieve their effective values from a shared ExtensionPrefValueMap. The OffTheRecordProfileImpl provides a request_context_ that uses the new PrefService already. BUG=66027,69057 TEST=unit tests, will be fully testable once the Proxy Settings API allows incognito settings. Review URL: http://codereview.chromium.org/5915004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72489 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete base/lock.h and fix up callers to use the new header file andbrettw@chromium.org2011-01-212-6/+6
| | | | | | | | | | | the base namespace. Fix several files including lock.h unnecessarily. BUG=none TEST=none Original review=http://codereview.chromium.org/6142009/ Patch by leviw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from TemplateURL and friends.avi@chromium.org2011-01-191-2/+2
| | | | | | | | | | | Re-landing r71485 (which was reverted in r71500). BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6278007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71814 0039d316-1c4b-4281-b951-d872f2087c98
* Allow policy refresh rate to be configured through policy.mnissler@chromium.org2011-01-1916-284/+469
| | | | | | | | | BUG=64877 TEST=Existing unittests; manual testing. Review URL: http://codereview.chromium.org/6310012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71790 0039d316-1c4b-4281-b951-d872f2087c98
* Regkey functions return error code instead of boolamit@chromium.org2011-01-191-32/+25
| | | | | | | | | | | | | | | | | | | | | | Change the Regkey helper to consistently use and return LONG instead of bool. Fix RegKey usage all over the code base and get rid of workarounds due to lack of return value. Reviewers: brettw: everything (skip parts for other reviewers if you wish) robertshield,grt: chrome_frame, installer siggi: ceee BUG=none TEST=covered by existing tests Review URL: http://codereview.chromium.org/6090006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71768 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 71656 - Allow policy refresh rate to be configured through policymnissler@chromium.org2011-01-1814-463/+269
| | | | | | | | BUG=none TEST=none TBR=mnissler git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71663 0039d316-1c4b-4281-b951-d872f2087c98
* Allow policy refresh rate to be configured through policy.mnissler@chromium.org2011-01-1814-269/+463
| | | | | | | | | BUG=64877 TEST=Existing unittests; manual testing. Review URL: http://codereview.chromium.org/6079012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71656 0039d316-1c4b-4281-b951-d872f2087c98
* Remove MessageLoop::DestructionObserver registration from ↵jkummerow@chromium.org2011-01-182-15/+3
| | | | | | | | | | | ConfigurationPolicyLoaderWin BUG=69193 TEST=No direct test; watch crash reports to see if the crash that's supposed to be fixed by this still occurs. Review URL: http://codereview.chromium.org/6316003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71636 0039d316-1c4b-4281-b951-d872f2087c98
* Made return types of various Value::DeepCopy() implementations more specificakalin@chromium.org2011-01-181-1/+1
| | | | | | | | | | | | | | | | | | Since C++ supports covariant return types, a subclass of Value can return its own pointer type for Value::DeepCopy(). Also made signatures of Value::Create*Value() more specific. Removed now-unnecessary casts. Added test for covariant return types. BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6324004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71617 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestContext URLRequestContext;tfarina@chromium.org2011-01-151-8/+8
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/6338002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71522 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 71485 - Remove wstring from TemplateURL and friends.avi@chromium.org2011-01-141-2/+2
| | | | | | | | | | | | BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6322001 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/6291003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71500 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from TemplateURL and friends.avi@chromium.org2011-01-141-2/+2
| | | | | | | | | BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6322001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71485 0039d316-1c4b-4281-b951-d872f2087c98
* Policy: Add ProxyMode and deprecate ProxyServerMode.danno@chromium.org2011-01-136-95/+208
| | | | | | | | | | | | | - Add support for 'deprecated' attribute in template generator - Add support for both int- and string- based enums in the template generator - Add logic to handle ProxyMode and fall back to ProxyServerMode BUG=68134 TEST=ConfigurationPolicyPrefStore*, new policy template generator tests Review URL: http://codereview.chromium.org/5958014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71315 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestStatus URLRequestStatus;tfarina@chromium.org2011-01-133-23/+24
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/6166010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71285 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the instant url managed by group policy.sky@chromium.org2011-01-127-0/+19
| | | | | | | | | BUG=64870 64922 TEST=none Review URL: http://codereview.chromium.org/6174002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71172 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded includes of chrome_switches.h.thestig@chromium.org2011-01-112-2/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6086003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70978 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestTestJob URLRequestTestJob;tfarina@chromium.org2011-01-111-5/+5
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/6202002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70966 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add namespace net to the remaining files under url_request directory.tfarina@chromium.org2011-01-061-6/+6
| | | | | | | | | | | | It just adds the 'namespace net' to these files and a typedef for them, because there are many entries to fix in one pass. They will be fixed later. BUG=64263 TEST=trybots Review URL: http://codereview.chromium.org/6056007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70592 0039d316-1c4b-4281-b951-d872f2087c98
* Move lots of GMock stuff out of line.erg@google.com2011-01-052-1/+31
| | | | | | | | | | | | | | Nico did some treemapping of our build time on Mac, and (surprise!) gmock unittests dominated. Gmock works with several large, heavy templates, and previous patches that out of line the ctors/dtors have significantly sped up compilation (e.g.GLMock) and have reduced thrashing. Nico says I should plug this again: http://www.chromium.org/developers/coding-style/cpp-dos-and-donts BUG=none TEST=none Review URL: http://codereview.chromium.org/6056008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70516 0039d316-1c4b-4281-b951-d872f2087c98
* Lifecycle management for PolicyProvidersjkummerow@chromium.org2011-01-0516-188/+249
| | | | | | | | | | | The ConfigurationPolicyProviderKeeper (and therefore the individual ConfigurationPolicyProviders) is now a member variable of the BrowserProcess instead of a singleton. This fixes memory leaks at the cost of slightly more complicated shutdown (the PolicyProviders must die while the file thread is still alive, but the preference system observing the providers for policy changes lives longer than that). BUG=66054, 66102 TEST=existing unit tests; valgrind Review URL: http://codereview.chromium.org/5962016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70496 0039d316-1c4b-4281-b951-d872f2087c98
* Move CancellationFlag and WaitableEvent to the synchronization subdirectory.brettw@chromium.org2011-01-022-2/+2
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/5977010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70369 0039d316-1c4b-4281-b951-d872f2087c98
* move base/object_watcher into base/win and add the win namespace. Fixup callers.brettw@google.com2011-01-011-4/+4
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/5971008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70360 0039d316-1c4b-4281-b951-d872f2087c98
* Move non_thread_safe from base to base/threading and into the base namespace.brettw@chromium.org2011-01-012-4/+4
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6005010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70351 0039d316-1c4b-4281-b951-d872f2087c98
* Fix setting a proxy configuration via policy that specifies a .pac file.danno@chromium.org2010-12-292-12/+13
| | | | | | | | | BUG=68099 TEST=manual testing of proxy policy Review URL: http://codereview.chromium.org/6021010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70259 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a dead type declaration overlooked when merging.mnissler@chromium.org2010-12-231-2/+0
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6066005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70053 0039d316-1c4b-4281-b951-d872f2087c98
* Observer interface for PolicyProvidersjkummerow@chromium.org2010-12-2316-124/+196
| | | | | | | | | BUG=67707 TEST=existing unit tests still work, in particular: *Policy* Review URL: http://codereview.chromium.org/6001004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70051 0039d316-1c4b-4281-b951-d872f2087c98
* Handle policy refresh internally in ConfigurationPolicyPrefStore.mnissler@chromium.org2010-12-2310-759/+964
| | | | | | | | | | | This removes the final bits of thread-switching madness from PrefValueStore and also makes sure only the PrefStores and PrefService instances that are actually affected by a policy change get reconfigured. BUG=67715 TEST=unit tests in configuration_policy_provider_unittest.cc Review URL: http://codereview.chromium.org/6074003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70050 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce a separate preference for 'proxy server mode'battre@chromium.org2010-12-238-245/+277
| | | | | | | | | | | | | The new preference is kProxyServerMode, which supersedes kProxyAutoDetect and kNoProxyServer. The point of this change is to represent 'use system proxy settings' in a more robust way. The proxy extension API is also adjusted to the preference system. This is a continuation of gfeher's patch from issue 5701003. BUG=65732, 66023 TEST=ProxyPrefsTest.*, and also covered by ExtensionApiTest.Porxy*, PrefProxyConfigServiceTest.* Review URL: http://codereview.chromium.org/6004003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70042 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the windows policy provider to use AsynchronousPolicyProvider.danno@chromium.org2010-12-2313-485/+522
| | | | | | | | | BUG=66453,65094 TEST=*Policy.* Review URL: http://codereview.chromium.org/6091002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70040 0039d316-1c4b-4281-b951-d872f2087c98
* (Re-landing http://codereview.chromium.org/5991003 after Chromium OSkbr@chromium.org2010-12-213-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | build fix to browser_render_process_host.cc) Added group policy for disabling all client-side 3D APIs in Chromium (in particular, WebGL and Pepper 3D). This has been hooked up through a new command-line argument (--disable-3d-apis) orthogonal to the existing ones, so that further changes to those command line arguments will not accidentally regress the group policy support. Tested in the following ways: - Verified that --disable-3d-apis disables WebGL and Pepper 3D support on Mac OS X. - Verified that specifying the Disable3DAPIs policy via a JSON file disables WebGL on Linux. - Ran unit_tests and verified that there were no failures introduced. BUG=64806 TEST=ConfigurationPolicyPrefStoreBooleanTest Review URL: http://codereview.chromium.org/6045003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69791 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 69753 - Added group policy for disabling all client-side 3D APIs in ↵chase@chromium.org2010-12-203-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Chromium (in particular, WebGL and Pepper 3D). This has been hooked up through a new command-line argument (--disable-3d-apis) orthogonal to the existing ones, so that further changes to those command line arguments will not accidentally regress the group policy support. Tested in the following ways: - Verified that --disable-3d-apis disables WebGL and Pepper 3D support on Mac OS X. - Verified that specifying the Disable3DAPIs policy via a JSON file disables WebGL on Linux. - Ran unit_tests and verified that there were no failures introduced. BUG=64806 TEST=ConfigurationPolicyPrefStoreBooleanTest Review URL: http://codereview.chromium.org/5991003 TBR=kbr@chromium.org Review URL: http://codereview.chromium.org/6027004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69759 0039d316-1c4b-4281-b951-d872f2087c98
* Added group policy for disabling all client-side 3D APIs in Chromiumkbr@chromium.org2010-12-203-1/+8
| | | | | | | | | | | | | | | | | | | | | (in particular, WebGL and Pepper 3D). This has been hooked up through a new command-line argument (--disable-3d-apis) orthogonal to the existing ones, so that further changes to those command line arguments will not accidentally regress the group policy support. Tested in the following ways: - Verified that --disable-3d-apis disables WebGL and Pepper 3D support on Mac OS X. - Verified that specifying the Disable3DAPIs policy via a JSON file disables WebGL on Linux. - Ran unit_tests and verified that there were no failures introduced. BUG=64806 TEST=ConfigurationPolicyPrefStoreBooleanTest Review URL: http://codereview.chromium.org/5991003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69753 0039d316-1c4b-4281-b951-d872f2087c98
* Allow default desktop content settings and default geolocation settings to ↵markusheintz@chromium.org2010-12-202-12/+21
| | | | | | | | | | | be managed via policy. (Support for the Cocoa UI will be added via a separate CL) BUG=63190,63187, 63180 TEST=none Review URL: http://codereview.chromium.org/5398001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69707 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded includes of notification_service.h, part 2.thestig@chromium.org2010-12-171-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5928003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69576 0039d316-1c4b-4281-b951-d872f2087c98
* Almost done deinlining virtual methods.erg@google.com2010-12-162-9/+28
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5841002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69470 0039d316-1c4b-4281-b951-d872f2087c98
* Move GUID utils to src/chrome/common.sergeyu@chromium.org2010-12-151-1/+1
| | | | | | | | | BUG=None TEST=compiles,unittests Review URL: http://codereview.chromium.org/5849001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69347 0039d316-1c4b-4281-b951-d872f2087c98
* Really apply the temp fix for hitting I/O on the main thread. Already approved.avi@chromium.org2010-12-151-1/+1
| | | | | | | | | | BUG=66453 TEST=none Review URL: http://codereview.chromium.org/5762002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69259 0039d316-1c4b-4281-b951-d872f2087c98
* Policy refresh hits the registry (an I/O operation) on the main thread.avi@chromium.org2010-12-141-0/+5
| | | | | | | | | BUG=66453 TEST=none Review URL: http://codereview.chromium.org/5762002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69131 0039d316-1c4b-4281-b951-d872f2087c98
* Fix policy refresh.danno@chromium.org2010-12-142-8/+8
| | | | | | | | | BUG=none TEST=change linux policy and check that it's refreshed Review URL: http://codereview.chromium.org/5732002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69126 0039d316-1c4b-4281-b951-d872f2087c98
* Deinline even more destructors.erg@google.com2010-12-146-3/+12
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5794003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69084 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded browser_thread.h usage.thestig@chromium.org2010-12-133-3/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5676004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69037 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestJob URLRequestJob;tfarina@chromium.org2010-12-111-1/+1
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/5607004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68935 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory leaks in AsynchronousPolicyProvider.danno@chromium.org2010-12-102-9/+11
| | | | | | | | | BUG=66102, 66054 TEST=valgrind on linux and mac Review URL: http://codereview.chromium.org/5748002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68844 0039d316-1c4b-4281-b951-d872f2087c98
* This is a continuation of http://codereview.chromium.org/5519016/, adds a ↵satish@chromium.org2010-12-091-8/+9
| | | | | | | | | | | | | new GetInstance() method for remaining files with singleton classes under chrome/browser. For types declared and used within the same .cc file, I changed them over to LazyInstance<T>. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5711001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68739 0039d316-1c4b-4281-b951-d872f2087c98
* Sanitize PrefStore interface.mnissler@chromium.org2010-12-093-65/+68
| | | | | | | | | | | | | | | | | This reworks the PrefStore interface, specifically: - Split up the interface into PrefStore, which only provides reading functionality, and the derived PersistentPrefStore for the actual user pref store - Remove the hurt-me-plenty prefs() function from PrefStore, instead provide Get/Set/Remove operations - Remove special handling of default and user pref store from PrefValueStore and put it into PrefService - Pref change notification handling now almost exclusively handled through PrefValueStore - Adjust all consumers of these interfaces (but keep ConfigurationPolicyPrefStore untouched, that's up next on the list) BUG=64232 TEST=existing unit tests Review URL: http://codereview.chromium.org/5646003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68736 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor FileBasedPolicyProvider, introduce AsynchronousPolicyProvider.danno@chromium.org2010-12-0921-534/+953
| | | | | | | | | | | Create a superclass of FileBasedPolicyProvider that abstracts how a provider can provide policy on the UI thread that is loaded from the FILE thread. BUG=65094 TEST=AsynchronousPolicyProvider.* Review URL: http://codereview.chromium.org/5562002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68735 0039d316-1c4b-4281-b951-d872f2087c98
* Add the "virtual" keyword on method overrides that are missing it.erg@google.com2010-12-082-5/+5
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5648004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68606 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up pref change notification handling.mnissler@chromium.org2010-12-081-1/+0
| | | | | | | | | | | | | | | This is a complete overhaul of PrefValueStore, PrefStore, PrefNotifier, and PrefService. Specifically: - Add an observer interface to PrefStore that can be used to notify the upper layers of the pref system about value changes. Currently, it's unused mostly, but that'll change when we refactor ExtensionPrefStore and ConfigurationPolicyPrefStore. - Make PrefNotifier be a dependency of PrefValueStore. That helps in keeping the pref change detection handling local to PrefValueStore. - Clean up related unit tests, removing redundant mocks and gmockify others. BUG=64893 TEST=Compiles and passes tests Review URL: http://codereview.chromium.org/5441002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68574 0039d316-1c4b-4281-b951-d872f2087c98