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

Side by Side Diff: chrome/browser/extensions/manifest_url_parser.h

Issue 11660016: Move the parsing of "chrome_url_overrides" out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments addressed Created 7 years, 11 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
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 #ifndef CHROME_BROWSER_EXTENSIONS_MANIFEST_URL_PARSER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_MANIFEST_URL_PARSER_H_
6 #define CHROME_BROWSER_EXTENSIONS_MANIFEST_URL_PARSER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_MANIFEST_URL_PARSER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" 9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h"
10 12
11 class Profile; 13 class Profile;
12 14
13 namespace extensions { 15 namespace extensions {
14 16
15 class ManifestURLParser : public ProfileKeyedAPI { 17 class ManifestURLParser : public ProfileKeyedAPI,
18 public content::NotificationObserver {
16 public: 19 public:
17 explicit ManifestURLParser(Profile* profile); 20 explicit ManifestURLParser(Profile* profile);
18 virtual ~ManifestURLParser(); 21 virtual ~ManifestURLParser();
19 22
23 // content::NotificationObserver implementation.
24 virtual void Observe(int type,
25 const content::NotificationSource& source,
26 const content::NotificationDetails& details) OVERRIDE;
27
20 private: 28 private:
21 friend class ProfileKeyedAPIFactory<ManifestURLParser>; 29 friend class ProfileKeyedAPIFactory<ManifestURLParser>;
22 30
23 // ProfileKeyedAPI implementation. 31 // ProfileKeyedAPI implementation.
24 static const char* service_name() { 32 static const char* service_name() {
25 return "ManifestURLParser"; 33 return "ManifestURLParser";
26 } 34 }
27 static const bool kServiceIsNULLWhileTesting = true; 35 static const bool kServiceIsNULLWhileTesting = true;
28 36
37 Profile* const profile_;
38 content::NotificationRegistrar registrar_;
39
29 DISALLOW_COPY_AND_ASSIGN(ManifestURLParser); 40 DISALLOW_COPY_AND_ASSIGN(ManifestURLParser);
30 }; 41 };
31 42
32 template <> 43 template <>
33 ProfileKeyedAPIFactory<ManifestURLParser>* 44 ProfileKeyedAPIFactory<ManifestURLParser>*
34 ProfileKeyedAPIFactory<ManifestURLParser>::GetInstance(); 45 ProfileKeyedAPIFactory<ManifestURLParser>::GetInstance();
35 46
36 } // namespace extensions 47 } // namespace extensions
37 48
38 #endif // CHROME_BROWSER_EXTENSIONS_MANIFEST_URL_PARSER_H_ 49 #endif // CHROME_BROWSER_EXTENSIONS_MANIFEST_URL_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698