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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.h

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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 | Annotate | Revision Log
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_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
7 7
8 #include "base/platform_file.h" 8 #include "base/platform_file.h"
9 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" 9 #include "chrome/browser/extensions/api/developer_private/entry_picker.h"
10 #include "chrome/browser/extensions/api/file_system/file_system_api.h" 10 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 namespace developer = extensions::api::developer_private; 48 namespace developer = extensions::api::developer_private;
49 49
50 typedef std::vector<linked_ptr<developer::ItemInfo> > ItemInfoList; 50 typedef std::vector<linked_ptr<developer::ItemInfo> > ItemInfoList;
51 typedef std::vector<linked_ptr<developer::ProjectInfo> > ProjectInfoList; 51 typedef std::vector<linked_ptr<developer::ProjectInfo> > ProjectInfoList;
52 typedef std::vector<linked_ptr<developer::ItemInspectView> > 52 typedef std::vector<linked_ptr<developer::ItemInspectView> >
53 ItemInspectViewList; 53 ItemInspectViewList;
54 54
55 namespace extensions { 55 namespace extensions {
56 56
57 // The profile-keyed service that manages the DeveloperPrivate API. 57 // The profile-keyed service that manages the DeveloperPrivate API.
58 class DeveloperPrivateAPI : public ProfileKeyedService, 58 class DeveloperPrivateAPI : public BrowserContextKeyedService,
59 public content::NotificationObserver { 59 public content::NotificationObserver {
60 public: 60 public:
61 // Convenience method to get the DeveloperPrivateAPI for a profile. 61 // Convenience method to get the DeveloperPrivateAPI for a profile.
62 static DeveloperPrivateAPI* Get(Profile* profile); 62 static DeveloperPrivateAPI* Get(Profile* profile);
63 63
64 explicit DeveloperPrivateAPI(Profile* profile); 64 explicit DeveloperPrivateAPI(Profile* profile);
65 virtual ~DeveloperPrivateAPI(); 65 virtual ~DeveloperPrivateAPI();
66 66
67 void SetLastUnpackedDirectory(const base::FilePath& path); 67 void SetLastUnpackedDirectory(const base::FilePath& path);
68 68
69 base::FilePath& GetLastUnpackedDirectory() { 69 base::FilePath& GetLastUnpackedDirectory() {
70 return last_unpacked_directory_; 70 return last_unpacked_directory_;
71 } 71 }
72 72
73 // ProfileKeyedService implementation 73 // BrowserContextKeyedService implementation
74 virtual void Shutdown() OVERRIDE; 74 virtual void Shutdown() OVERRIDE;
75 75
76 // content::NotificationObserver implementation. 76 // content::NotificationObserver implementation.
77 virtual void Observe(int type, 77 virtual void Observe(int type,
78 const content::NotificationSource& source, 78 const content::NotificationSource& source,
79 const content::NotificationDetails& details) OVERRIDE; 79 const content::NotificationDetails& details) OVERRIDE;
80 80
81 private: 81 private:
82 void RegisterNotifications(); 82 void RegisterNotifications();
83 83
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 void GetUnpackedExtension(const base::FilePath& path, 444 void GetUnpackedExtension(const base::FilePath& path,
445 const ExtensionSet* extensions); 445 const ExtensionSet* extensions);
446 }; 446 };
447 447
448 } // namespace api 448 } // namespace api
449 449
450 } // namespace extensions 450 } // namespace extensions
451 451
452 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_ 452 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698