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

Side by Side Diff: chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc

Issue 1770943005: Removed AttemptResult enum in favor of using DefaultWebClientState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dont_record_async_duration
Patch Set: Rebase Created 4 years, 9 months 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
« no previous file with comments | « no previous file | chrome/browser/external_protocol/external_protocol_handler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/custom_handlers/protocol_handler_registry.h" 5 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 force_failure_(force_failure) {} 147 force_failure_(force_failure) {}
148 148
149 private: 149 private:
150 ~FakeProtocolClientWorker() override = default; 150 ~FakeProtocolClientWorker() override = default;
151 151
152 shell_integration::DefaultWebClientState CheckIsDefaultImpl() override { 152 shell_integration::DefaultWebClientState CheckIsDefaultImpl() override {
153 return force_failure_ ? shell_integration::NOT_DEFAULT 153 return force_failure_ ? shell_integration::NOT_DEFAULT
154 : shell_integration::IS_DEFAULT; 154 : shell_integration::IS_DEFAULT;
155 } 155 }
156 156
157 AttemptResult SetAsDefaultImpl() override { return AttemptResult::SUCCESS; } 157 void SetAsDefaultImpl() override {}
158 158
159 private: 159 private:
160 bool force_failure_; 160 bool force_failure_;
161 }; 161 };
162 162
163 class FakeDelegate : public ProtocolHandlerRegistry::Delegate { 163 class FakeDelegate : public ProtocolHandlerRegistry::Delegate {
164 public: 164 public:
165 FakeDelegate() : force_os_failure_(false) {} 165 FakeDelegate() : force_os_failure_(false) {}
166 ~FakeDelegate() override {} 166 ~FakeDelegate() override {}
167 void RegisterExternalHandler(const std::string& protocol) override { 167 void RegisterExternalHandler(const std::string& protocol) override {
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 // added to pref. 1077 // added to pref.
1078 ASSERT_EQ(InPrefIgnoredHandlerCount(), 2); 1078 ASSERT_EQ(InPrefIgnoredHandlerCount(), 2);
1079 ASSERT_EQ(InMemoryIgnoredHandlerCount(), 4); 1079 ASSERT_EQ(InMemoryIgnoredHandlerCount(), 4);
1080 1080
1081 registry()->RemoveIgnoredHandler(p2u1); 1081 registry()->RemoveIgnoredHandler(p2u1);
1082 1082
1083 // p2u1 installed by user and policy, so it is removed from pref alone. 1083 // p2u1 installed by user and policy, so it is removed from pref alone.
1084 ASSERT_EQ(InPrefIgnoredHandlerCount(), 1); 1084 ASSERT_EQ(InPrefIgnoredHandlerCount(), 1);
1085 ASSERT_EQ(InMemoryIgnoredHandlerCount(), 4); 1085 ASSERT_EQ(InMemoryIgnoredHandlerCount(), 4);
1086 } 1086 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/external_protocol/external_protocol_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698