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

Side by Side Diff: chrome/browser/policy/cloud/policy_header_service_factory.h

Issue 99433004: Add a header when fetching pages under the DMServer URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed per willchan's feedback Created 7 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_HEADER_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_HEADER_SERVICE_FACTORY_H_
7
8 #include "base/memory/singleton.h"
9 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h"
10
11 namespace policy {
12
13 class PolicyHeaderService;
14
15 // Factory for PolicyHeaderService objects. PolicyHeaderService is not actually
16 // a BrowserContextKeyedService, so this class wraps PolicyHeaderService in
17 // a BrowserContextKeyedService internally.
18 class PolicyHeaderServiceFactory : public BrowserContextKeyedServiceFactory {
19 public:
20 // Returns the instance of PolicyHeaderService for the passed |context|, or
21 // NULL if there is none (for instance, for incognito windows).
22 static PolicyHeaderService* GetForBrowserContext(
23 content::BrowserContext* context);
24
25 // Returns an instance of the PolicyHeaderServiceFactory singleton.
26 static PolicyHeaderServiceFactory* GetInstance();
27
28 protected:
29 // BrowserContextKeyedServiceFactory implementation.
30 virtual BrowserContextKeyedService* BuildServiceInstanceFor(
31 content::BrowserContext* profile) const OVERRIDE;
32
33 private:
34 friend struct DefaultSingletonTraits<PolicyHeaderServiceFactory>;
35
36 PolicyHeaderServiceFactory();
37 virtual ~PolicyHeaderServiceFactory();
38
39 DISALLOW_COPY_AND_ASSIGN(PolicyHeaderServiceFactory);
40 };
41
42 } // namespace policy
43
44 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_HEADER_SERVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/policy_header_service.cc ('k') | chrome/browser/policy/cloud/policy_header_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698