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/api/runtime/runtime_api.h" | 5 #include "chrome/browser/extensions/api/runtime/runtime_api.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 scoped_ptr<base::ListValue> event_args(new base::ListValue()); | 107 scoped_ptr<base::ListValue> event_args(new base::ListValue()); |
108 scoped_ptr<Event> event(new Event(kOnStartupEvent, event_args.Pass())); | 108 scoped_ptr<Event> event(new Event(kOnStartupEvent, event_args.Pass())); |
109 system->event_router()->DispatchEventToExtension(extension_id, event.Pass()); | 109 system->event_router()->DispatchEventToExtension(extension_id, event.Pass()); |
110 } | 110 } |
111 | 111 |
112 void SetUninstallUrl(ExtensionPrefs* prefs, | 112 void SetUninstallUrl(ExtensionPrefs* prefs, |
113 const std::string& extension_id, | 113 const std::string& extension_id, |
114 const std::string& url_string) { | 114 const std::string& url_string) { |
115 prefs->UpdateExtensionPref(extension_id, | 115 prefs->UpdateExtensionPref(extension_id, |
116 kUninstallUrl, | 116 kUninstallUrl, |
117 base::Value::CreateStringValue(url_string)); | 117 new base::StringValue(url_string)); |
118 } | 118 } |
119 | 119 |
120 std::string GetUninstallUrl(ExtensionPrefs* prefs, | 120 std::string GetUninstallUrl(ExtensionPrefs* prefs, |
121 const std::string& extension_id) { | 121 const std::string& extension_id) { |
122 std::string url_string; | 122 std::string url_string; |
123 prefs->ReadPrefAsString(extension_id, kUninstallUrl, &url_string); | 123 prefs->ReadPrefAsString(extension_id, kUninstallUrl, &url_string); |
124 return url_string; | 124 return url_string; |
125 } | 125 } |
126 | 126 |
127 } // namespace | 127 } // namespace |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 content::ChildProcessSecurityPolicy::GetInstance(); | 420 content::ChildProcessSecurityPolicy::GetInstance(); |
421 policy->GrantReadFileSystem(renderer_id, filesystem_id); | 421 policy->GrantReadFileSystem(renderer_id, filesystem_id); |
422 base::DictionaryValue* dict = new base::DictionaryValue(); | 422 base::DictionaryValue* dict = new base::DictionaryValue(); |
423 SetResult(dict); | 423 SetResult(dict); |
424 dict->SetString("fileSystemId", filesystem_id); | 424 dict->SetString("fileSystemId", filesystem_id); |
425 dict->SetString("baseName", relative_path); | 425 dict->SetString("baseName", relative_path); |
426 return true; | 426 return true; |
427 } | 427 } |
428 | 428 |
429 } // namespace extensions | 429 } // namespace extensions |
OLD | NEW |