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 #include "chrome/browser/extensions/extension_prefs.h" | 5 #include "chrome/browser/extensions/extension_prefs.h" |
6 | 6 |
7 #include <iterator> | 7 #include <iterator> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/prefs/pref_notifier.h" | 10 #include "base/prefs/pref_notifier.h" |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 extension_pref_value_map, | 341 extension_pref_value_map, |
342 app_sorting.Pass(), | 342 app_sorting.Pass(), |
343 time_provider.Pass(), | 343 time_provider.Pass(), |
344 extensions_disabled); | 344 extensions_disabled); |
345 } | 345 } |
346 | 346 |
347 ExtensionPrefs::~ExtensionPrefs() { | 347 ExtensionPrefs::~ExtensionPrefs() { |
348 } | 348 } |
349 | 349 |
350 // static | 350 // static |
351 ExtensionPrefs* ExtensionPrefs::Get(Profile* profile) { | 351 ExtensionPrefs* ExtensionPrefs::Get(content::BrowserContext* context) { |
352 return ExtensionPrefsFactory::GetInstance()->GetForProfile(profile); | 352 return ExtensionPrefsFactory::GetInstance()->GetForBrowserContext(context); |
353 } | 353 } |
354 | 354 |
355 static base::FilePath::StringType MakePathRelative(const base::FilePath& parent, | 355 static base::FilePath::StringType MakePathRelative(const base::FilePath& parent, |
356 const base::FilePath& child) { | 356 const base::FilePath& child) { |
357 if (!parent.IsParent(child)) | 357 if (!parent.IsParent(child)) |
358 return child.value(); | 358 return child.value(); |
359 | 359 |
360 base::FilePath::StringType retval = child.value().substr( | 360 base::FilePath::StringType retval = child.value().substr( |
361 parent.value().length()); | 361 parent.value().length()); |
362 if (base::FilePath::IsSeparator(retval[0])) | 362 if (base::FilePath::IsSeparator(retval[0])) |
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1987 is_enabled = initial_state == Extension::ENABLED; | 1987 is_enabled = initial_state == Extension::ENABLED; |
1988 } | 1988 } |
1989 | 1989 |
1990 extension_pref_value_map_->RegisterExtension(extension_id, install_time, | 1990 extension_pref_value_map_->RegisterExtension(extension_id, install_time, |
1991 is_enabled); | 1991 is_enabled); |
1992 content_settings_store_->RegisterExtension(extension_id, install_time, | 1992 content_settings_store_->RegisterExtension(extension_id, install_time, |
1993 is_enabled); | 1993 is_enabled); |
1994 } | 1994 } |
1995 | 1995 |
1996 } // namespace extensions | 1996 } // namespace extensions |
OLD | NEW |