OLD | NEW |
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 // Defines common functionality used by the implementation of the Chrome | 5 // Defines common functionality used by the implementation of the Chrome |
6 // Extensions Cookies API implemented in | 6 // Extensions Cookies API implemented in |
7 // chrome/browser/extensions/api/cookies/cookies_api.cc. This separate interface | 7 // chrome/browser/extensions/api/cookies/cookies_api.cc. This separate interface |
8 // exposes pieces of the API implementation mainly for unit testing purposes. | 8 // exposes pieces of the API implementation mainly for unit testing purposes. |
9 | 9 |
10 #ifndef CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_HELPERS_H_ | 10 #ifndef CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_HELPERS_H_ |
11 #define CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_HELPERS_H_ | 11 #define CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_HELPERS_H_ |
12 #pragma once | 12 #pragma once |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "net/cookies/cookie_monster.h" | 16 #include "net/cookies/cookie_monster.h" |
17 | 17 |
18 class Browser; | 18 class Browser; |
19 class Extension; | |
20 class Profile; | 19 class Profile; |
21 | 20 |
22 namespace base { | 21 namespace base { |
23 class DictionaryValue; | 22 class DictionaryValue; |
24 class ListValue; | 23 class ListValue; |
25 } | 24 } |
26 | 25 |
27 namespace extensions { | 26 namespace extensions { |
| 27 |
| 28 class Extension; |
| 29 |
28 namespace cookies_helpers { | 30 namespace cookies_helpers { |
29 | 31 |
30 // Returns either the original profile or the incognito profile, based on the | 32 // Returns either the original profile or the incognito profile, based on the |
31 // given store ID. Returns NULL if the profile doesn't exist or is not allowed | 33 // given store ID. Returns NULL if the profile doesn't exist or is not allowed |
32 // (e.g. if incognito mode is not enabled for the extension). | 34 // (e.g. if incognito mode is not enabled for the extension). |
33 Profile* ChooseProfileFromStoreId(const std::string& store_id, | 35 Profile* ChooseProfileFromStoreId(const std::string& store_id, |
34 Profile* profile, | 36 Profile* profile, |
35 bool include_incognito); | 37 bool include_incognito); |
36 | 38 |
37 // Returns the store ID for a particular user profile. | 39 // Returns the store ID for a particular user profile. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // 'foo.bar.com', '.foo.bar.com', and 'baz.foo.bar.com'. | 117 // 'foo.bar.com', '.foo.bar.com', and 'baz.foo.bar.com'. |
116 bool MatchesDomain(const std::string& domain); | 118 bool MatchesDomain(const std::string& domain); |
117 | 119 |
118 const base::DictionaryValue* details_; | 120 const base::DictionaryValue* details_; |
119 }; | 121 }; |
120 | 122 |
121 } // namespace cookies_helpers | 123 } // namespace cookies_helpers |
122 } // namespace extensions | 124 } // namespace extensions |
123 | 125 |
124 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_HELPERS_H_ | 126 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_HELPERS_H_ |
OLD | NEW |