Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 2483513002: Revert of Makes the component installers return a Result instead of a bool. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "components/policy/core/common/policy_types.h" 111 #include "components/policy/core/common/policy_types.h"
112 #include "components/policy/policy_constants.h" 112 #include "components/policy/policy_constants.h"
113 #include "components/prefs/pref_service.h" 113 #include "components/prefs/pref_service.h"
114 #include "components/search/search.h" 114 #include "components/search/search.h"
115 #include "components/search_engines/template_url.h" 115 #include "components/search_engines/template_url.h"
116 #include "components/search_engines/template_url_service.h" 116 #include "components/search_engines/template_url_service.h"
117 #include "components/security_interstitials/core/controller_client.h" 117 #include "components/security_interstitials/core/controller_client.h"
118 #include "components/strings/grit/components_strings.h" 118 #include "components/strings/grit/components_strings.h"
119 #include "components/translate/core/browser/language_state.h" 119 #include "components/translate/core/browser/language_state.h"
120 #include "components/translate/core/browser/translate_infobar_delegate.h" 120 #include "components/translate/core/browser/translate_infobar_delegate.h"
121 #include "components/update_client/update_client.h"
122 #include "components/update_client/update_client_errors.h" 121 #include "components/update_client/update_client_errors.h"
123 #include "components/update_client/url_request_post_interceptor.h" 122 #include "components/update_client/url_request_post_interceptor.h"
124 #include "components/user_prefs/user_prefs.h" 123 #include "components/user_prefs/user_prefs.h"
125 #include "components/variations/service/variations_service.h" 124 #include "components/variations/service/variations_service.h"
126 #include "components/version_info/version_info.h" 125 #include "components/version_info/version_info.h"
127 #include "content/public/browser/browser_context.h" 126 #include "content/public/browser/browser_context.h"
128 #include "content/public/browser/browser_thread.h" 127 #include "content/public/browser/browser_thread.h"
129 #include "content/public/browser/child_process_data.h" 128 #include "content/public/browser/child_process_data.h"
130 #include "content/public/browser/download_item.h" 129 #include "content/public/browser/download_item.h"
131 #include "content/public/browser/download_manager.h" 130 #include "content/public/browser/download_manager.h"
(...skipping 3487 matching lines...) Expand 10 before | Expand all | Expand 10 after
3619 } 3618 }
3620 3619
3621 update_client::CrxComponent ComponentUpdaterPolicyTest::MakeCrxComponent( 3620 update_client::CrxComponent ComponentUpdaterPolicyTest::MakeCrxComponent(
3622 bool supports_group_policy_enable_component_updates) { 3621 bool supports_group_policy_enable_component_updates) {
3623 class MockInstaller : public update_client::CrxInstaller { 3622 class MockInstaller : public update_client::CrxInstaller {
3624 public: 3623 public:
3625 MockInstaller() {} 3624 MockInstaller() {}
3626 3625
3627 MOCK_METHOD1(OnUpdateError, void(int error)); 3626 MOCK_METHOD1(OnUpdateError, void(int error));
3628 MOCK_METHOD2(Install, 3627 MOCK_METHOD2(Install,
3629 update_client::CrxInstaller::Result( 3628 bool(const base::DictionaryValue& manifest,
3630 const base::DictionaryValue& manifest, 3629 const base::FilePath& unpack_path));
3631 const base::FilePath& unpack_path));
3632 MOCK_METHOD2(GetInstalledFile, 3630 MOCK_METHOD2(GetInstalledFile,
3633 bool(const std::string& file, base::FilePath* installed_file)); 3631 bool(const std::string& file, base::FilePath* installed_file));
3634 MOCK_METHOD0(Uninstall, bool()); 3632 MOCK_METHOD0(Uninstall, bool());
3635 3633
3636 private: 3634 private:
3637 ~MockInstaller() override {} 3635 ~MockInstaller() override {}
3638 }; 3636 };
3639 3637
3640 // component id "jebgalgnebhfojomionfpkfelancnnkf". 3638 // component id "jebgalgnebhfojomionfpkfelancnnkf".
3641 static const uint8_t jebg_hash[] = { 3639 static const uint8_t jebg_hash[] = {
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
4227 4225
4228 SetEmptyPolicy(); 4226 SetEmptyPolicy();
4229 // Policy not set. 4227 // Policy not set.
4230 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); 4228 CheckSystemTimezoneAutomaticDetectionPolicyUnset();
4231 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); 4229 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false));
4232 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); 4230 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests());
4233 } 4231 }
4234 #endif // defined(OS_CHROMEOS) 4232 #endif // defined(OS_CHROMEOS)
4235 4233
4236 } // namespace policy 4234 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/net/crl_set_fetcher.cc ('k') | components/component_updater/component_updater_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698