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

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

Issue 52983004: Convert ExtensionProcessManager to BrowserContext, part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 const std::string& extension_id) { 125 const std::string& extension_id) {
126 std::string url_string; 126 std::string url_string;
127 prefs->ReadPrefAsString(extension_id, kUninstallUrl, &url_string); 127 prefs->ReadPrefAsString(extension_id, kUninstallUrl, &url_string);
128 return url_string; 128 return url_string;
129 } 129 }
130 130
131 } // namespace 131 } // namespace
132 132
133 // static 133 // static
134 void RuntimeEventRouter::DispatchOnStartupEvent( 134 void RuntimeEventRouter::DispatchOnStartupEvent(
135 Profile* profile, const std::string& extension_id) { 135 content::BrowserContext* context, const std::string& extension_id) {
136 // TODO(jamescook): Convert to BrowserContext all the way down.
137 Profile* profile = static_cast<Profile*>(context);
136 DispatchOnStartupEventImpl(profile, extension_id, true, NULL); 138 DispatchOnStartupEventImpl(profile, extension_id, true, NULL);
137 } 139 }
138 140
139 // static 141 // static
140 void RuntimeEventRouter::DispatchOnInstalledEvent( 142 void RuntimeEventRouter::DispatchOnInstalledEvent(
141 Profile* profile, 143 Profile* profile,
142 const std::string& extension_id, 144 const std::string& extension_id,
143 const Version& old_version, 145 const Version& old_version,
144 bool chrome_updated) { 146 bool chrome_updated) {
145 ExtensionSystem* system = ExtensionSystem::Get(profile); 147 ExtensionSystem* system = ExtensionSystem::Get(profile);
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 content::ChildProcessSecurityPolicy::GetInstance(); 444 content::ChildProcessSecurityPolicy::GetInstance();
443 policy->GrantReadFileSystem(renderer_id, filesystem_id); 445 policy->GrantReadFileSystem(renderer_id, filesystem_id);
444 base::DictionaryValue* dict = new base::DictionaryValue(); 446 base::DictionaryValue* dict = new base::DictionaryValue();
445 SetResult(dict); 447 SetResult(dict);
446 dict->SetString("fileSystemId", filesystem_id); 448 dict->SetString("fileSystemId", filesystem_id);
447 dict->SetString("baseName", relative_path); 449 dict->SetString("baseName", relative_path);
448 return true; 450 return true;
449 } 451 }
450 452
451 } // namespace extensions 453 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698