| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXTENSION_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 std::set<std::string> GetIdleInstallInfoIds(); | 165 std::set<std::string> GetIdleInstallInfoIds(); |
| 166 | 166 |
| 167 // We allow the web store to set a string containing login information when a | 167 // We allow the web store to set a string containing login information when a |
| 168 // purchase is made, so that when a user logs into sync with a different | 168 // purchase is made, so that when a user logs into sync with a different |
| 169 // account we can recognize the situation. The Get function returns true if | 169 // account we can recognize the situation. The Get function returns true if |
| 170 // there was previously stored data (placing it in |result|), or false | 170 // there was previously stored data (placing it in |result|), or false |
| 171 // otherwise. The Set will overwrite any previous login. | 171 // otherwise. The Set will overwrite any previous login. |
| 172 bool GetWebStoreLogin(std::string* result); | 172 bool GetWebStoreLogin(std::string* result); |
| 173 void SetWebStoreLogin(const std::string& login); | 173 void SetWebStoreLogin(const std::string& login); |
| 174 | 174 |
| 175 // Get the application launch index for an extension with |extension_id|. This |
| 176 // determines the order of which the applications appear on the New Tab Page. |
| 177 // A value of 0 generally indicates top left. If the extension has no launch |
| 178 // index a -1 value is returned. |
| 179 int GetAppLaunchIndex(const std::string& extension_id); |
| 180 |
| 181 // Sets a specific launch index for an extension with |extension_id|. |
| 182 void SetAppLaunchIndex(const std::string& extension_id, int index); |
| 183 |
| 184 // Gets the next available application launch index. This is 1 higher than the |
| 185 // highest current application launch index found. |
| 186 int GetNextAppLaunchIndex(); |
| 187 |
| 175 static void RegisterUserPrefs(PrefService* prefs); | 188 static void RegisterUserPrefs(PrefService* prefs); |
| 176 | 189 |
| 177 // The underlying PrefService. | 190 // The underlying PrefService. |
| 178 PrefService* pref_service() const { return prefs_; } | 191 PrefService* pref_service() const { return prefs_; } |
| 179 | 192 |
| 180 private: | 193 private: |
| 181 // Converts absolute paths in the pref to paths relative to the | 194 // Converts absolute paths in the pref to paths relative to the |
| 182 // install_directory_. | 195 // install_directory_. |
| 183 void MakePathsRelative(); | 196 void MakePathsRelative(); |
| 184 | 197 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 // Base extensions install directory. | 254 // Base extensions install directory. |
| 242 FilePath install_directory_; | 255 FilePath install_directory_; |
| 243 | 256 |
| 244 // The URLs of all of the toolstrips. | 257 // The URLs of all of the toolstrips. |
| 245 URLList shelf_order_; | 258 URLList shelf_order_; |
| 246 | 259 |
| 247 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 260 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 248 }; | 261 }; |
| 249 | 262 |
| 250 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 263 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| OLD | NEW |