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

Side by Side Diff: components/quirks/quirks_manager.h

Issue 2765703003: Include display names in Quirks URL (Closed)
Patch Set: Created 3 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 | « components/quirks/quirks_client.cc ('k') | components/quirks/quirks_manager.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_QUIRKS_QUIRKS_MANAGER_H_ 5 #ifndef COMPONENTS_QUIRKS_QUIRKS_MANAGER_H_
6 #define COMPONENTS_QUIRKS_QUIRKS_MANAGER_H_ 6 #define COMPONENTS_QUIRKS_QUIRKS_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 static QuirksManager* Get(); 85 static QuirksManager* Get();
86 86
87 static void RegisterPrefs(PrefRegistrySimple* registry); 87 static void RegisterPrefs(PrefRegistrySimple* registry);
88 88
89 // Signal to start queued downloads after login. 89 // Signal to start queued downloads after login.
90 void OnLoginCompleted(); 90 void OnLoginCompleted();
91 91
92 // Entry point into manager. Finds or downloads icc file. 92 // Entry point into manager. Finds or downloads icc file.
93 void RequestIccProfilePath( 93 void RequestIccProfilePath(
94 int64_t product_id, 94 int64_t product_id,
95 const std::string& display_name,
95 const RequestFinishedCallback& on_request_finished); 96 const RequestFinishedCallback& on_request_finished);
96 97
97 void ClientFinished(QuirksClient* client); 98 void ClientFinished(QuirksClient* client);
98 99
99 // Creates a real URLFetcher for OS, and a fake one for tests. 100 // Creates a real URLFetcher for OS, and a fake one for tests.
100 std::unique_ptr<net::URLFetcher> CreateURLFetcher( 101 std::unique_ptr<net::URLFetcher> CreateURLFetcher(
101 const GURL& url, 102 const GURL& url,
102 net::URLFetcherDelegate* delegate); 103 net::URLFetcherDelegate* delegate);
103 104
104 Delegate* delegate() { return delegate_.get(); } 105 Delegate* delegate() { return delegate_.get(); }
(...skipping 13 matching lines...) Expand all
118 private: 119 private:
119 QuirksManager(std::unique_ptr<Delegate> delegate, 120 QuirksManager(std::unique_ptr<Delegate> delegate,
120 scoped_refptr<base::SequencedWorkerPool> blocking_pool, 121 scoped_refptr<base::SequencedWorkerPool> blocking_pool,
121 PrefService* local_state, 122 PrefService* local_state,
122 scoped_refptr<net::URLRequestContextGetter> url_context_getter); 123 scoped_refptr<net::URLRequestContextGetter> url_context_getter);
123 ~QuirksManager(); 124 ~QuirksManager();
124 125
125 // Callback after checking for existing icc file; proceed if not found. 126 // Callback after checking for existing icc file; proceed if not found.
126 void OnIccFilePathRequestCompleted( 127 void OnIccFilePathRequestCompleted(
127 int64_t product_id, 128 int64_t product_id,
129 const std::string& display_name,
128 const RequestFinishedCallback& on_request_finished, 130 const RequestFinishedCallback& on_request_finished,
129 base::FilePath path); 131 base::FilePath path);
130 132
131 // Whether downloads allowed by cmd line flag and device policy. 133 // Whether downloads allowed by cmd line flag and device policy.
132 bool QuirksEnabled(); 134 bool QuirksEnabled();
133 135
134 // Records time of most recent server check. 136 // Records time of most recent server check.
135 void SetLastServerCheck(int64_t product_id, const base::Time& last_check); 137 void SetLastServerCheck(int64_t product_id, const base::Time& last_check);
136 138
137 // Set of active clients, each created to download a different Quirks file. 139 // Set of active clients, each created to download a different Quirks file.
(...skipping 15 matching lines...) Expand all
153 155
154 // Factory for callbacks. 156 // Factory for callbacks.
155 base::WeakPtrFactory<QuirksManager> weak_ptr_factory_; 157 base::WeakPtrFactory<QuirksManager> weak_ptr_factory_;
156 158
157 DISALLOW_COPY_AND_ASSIGN(QuirksManager); 159 DISALLOW_COPY_AND_ASSIGN(QuirksManager);
158 }; 160 };
159 161
160 } // namespace quirks 162 } // namespace quirks
161 163
162 #endif // COMPONENTS_QUIRKS_QUIRKS_MANAGER_H_ 164 #endif // COMPONENTS_QUIRKS_QUIRKS_MANAGER_H_
OLDNEW
« no previous file with comments | « components/quirks/quirks_client.cc ('k') | components/quirks/quirks_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698