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

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

Issue 22885002: c/b/extensions, json_schema_compiler: Do not use Value::Create*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed C-style casts. Created 7 years, 4 months 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
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/rtc_private/rtc_private_api.cc ('k') | chrome/browser/extensions/api/serial/serial_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698