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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 } | 114 } |
115 | 115 |
116 void SetUninstallUrl(ExtensionPrefs* prefs, | 116 void SetUninstallUrl(ExtensionPrefs* prefs, |
117 const std::string& extension_id, | 117 const std::string& extension_id, |
118 const std::string& url_string) { | 118 const std::string& url_string) { |
119 prefs->UpdateExtensionPref(extension_id, | 119 prefs->UpdateExtensionPref(extension_id, |
120 kUninstallUrl, | 120 kUninstallUrl, |
121 new base::StringValue(url_string)); | 121 new base::StringValue(url_string)); |
122 } | 122 } |
123 | 123 |
124 #if defined(ENABLE_EXTENSIONS) | |
124 std::string GetUninstallUrl(ExtensionPrefs* prefs, | 125 std::string GetUninstallUrl(ExtensionPrefs* prefs, |
125 const std::string& extension_id) { | 126 const std::string& extension_id) { |
126 std::string url_string; | 127 std::string url_string; |
127 prefs->ReadPrefAsString(extension_id, kUninstallUrl, &url_string); | 128 prefs->ReadPrefAsString(extension_id, kUninstallUrl, &url_string); |
128 return url_string; | 129 return url_string; |
129 } | 130 } |
131 #endif // if defined(ENABLE_EXTENSIONS) | |
Nico
2013/11/10 05:07:09
No "if", just " // defined(ENABLE_EXTENSIONS)"
hans
2013/11/11 19:29:51
Done. Seems my vim was getting sloppy :)
| |
130 | 132 |
131 } // namespace | 133 } // namespace |
132 | 134 |
133 // static | 135 // static |
134 void RuntimeEventRouter::DispatchOnStartupEvent( | 136 void RuntimeEventRouter::DispatchOnStartupEvent( |
135 content::BrowserContext* context, const std::string& extension_id) { | 137 content::BrowserContext* context, const std::string& extension_id) { |
136 // TODO(jamescook): Convert to BrowserContext all the way down. | 138 // TODO(jamescook): Convert to BrowserContext all the way down. |
137 Profile* profile = static_cast<Profile*>(context); | 139 Profile* profile = static_cast<Profile*>(context); |
138 DispatchOnStartupEventImpl(profile, extension_id, true, NULL); | 140 DispatchOnStartupEventImpl(profile, extension_id, true, NULL); |
139 } | 141 } |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
444 content::ChildProcessSecurityPolicy::GetInstance(); | 446 content::ChildProcessSecurityPolicy::GetInstance(); |
445 policy->GrantReadFileSystem(renderer_id, filesystem_id); | 447 policy->GrantReadFileSystem(renderer_id, filesystem_id); |
446 base::DictionaryValue* dict = new base::DictionaryValue(); | 448 base::DictionaryValue* dict = new base::DictionaryValue(); |
447 SetResult(dict); | 449 SetResult(dict); |
448 dict->SetString("fileSystemId", filesystem_id); | 450 dict->SetString("fileSystemId", filesystem_id); |
449 dict->SetString("baseName", relative_path); | 451 dict->SetString("baseName", relative_path); |
450 return true; | 452 return true; |
451 } | 453 } |
452 | 454 |
453 } // namespace extensions | 455 } // namespace extensions |
OLD | NEW |