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 #include "chrome/browser/extensions/extension_module.h" | 5 #include "chrome/browser/extensions/extension_module.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "chrome/browser/extensions/extension_prefs.h" | 9 #include "chrome/browser/extensions/extension_prefs.h" |
10 #include "chrome/browser/extensions/extensions_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 | 12 |
13 ExtensionPrefs* SetUpdateUrlDataFunction::extension_prefs() { | 13 ExtensionPrefs* SetUpdateUrlDataFunction::extension_prefs() { |
14 return profile()->GetExtensionsService()->extension_prefs(); | 14 return profile()->GetExtensionService()->extension_prefs(); |
15 } | 15 } |
16 | 16 |
17 bool SetUpdateUrlDataFunction::RunImpl() { | 17 bool SetUpdateUrlDataFunction::RunImpl() { |
18 std::string data; | 18 std::string data; |
19 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data)); | 19 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data)); |
20 | 20 |
21 extension_prefs()->SetUpdateUrlData(extension_id(), data); | 21 extension_prefs()->SetUpdateUrlData(extension_id(), data); |
22 return true; | 22 return true; |
23 } | 23 } |
OLD | NEW |