Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Side by Side Diff: chrome/browser/extensions/api/runtime/runtime_api.cc

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 // defined(ENABLE_EXTENSIONS)
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698