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

Side by Side Diff: chrome/browser/extensions/state_store.cc

Issue 15239002: Move Extension and PermissionsData to extensions/common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/state_store.h" 5 #include "chrome/browser/extensions/state_store.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/common/extensions/extension.h"
11 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
12 #include "content/public/browser/notification_types.h" 11 #include "content/public/browser/notification_types.h"
12 #include "extensions/common/extension.h"
13 13
14 namespace { 14 namespace {
15 15
16 // Delay, in seconds, before we should open the State Store database. We 16 // Delay, in seconds, before we should open the State Store database. We
17 // defer it to avoid slowing down startup. See http://crbug.com/161848 17 // defer it to avoid slowing down startup. See http://crbug.com/161848
18 const int kInitDelaySeconds = 1; 18 const int kInitDelaySeconds = 1;
19 19
20 std::string GetFullKey(const std::string& extension_id, 20 std::string GetFullKey(const std::string& extension_id,
21 const std::string& key) { 21 const std::string& key) {
22 return extension_id + "." + key; 22 return extension_id + "." + key;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 void StateStore::RemoveKeysForExtension(const std::string& extension_id) { 162 void StateStore::RemoveKeysForExtension(const std::string& extension_id) {
163 for (std::set<std::string>::iterator key = registered_keys_.begin(); 163 for (std::set<std::string>::iterator key = registered_keys_.begin();
164 key != registered_keys_.end(); ++key) { 164 key != registered_keys_.end(); ++key) {
165 task_queue_->InvokeWhenReady( 165 task_queue_->InvokeWhenReady(
166 base::Bind(&ValueStoreFrontend::Remove, base::Unretained(&store_), 166 base::Bind(&ValueStoreFrontend::Remove, base::Unretained(&store_),
167 GetFullKey(extension_id, *key))); 167 GetFullKey(extension_id, *key)));
168 } 168 }
169 } 169 }
170 170
171 } // namespace extensions 171 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/startup_helper.cc ('k') | chrome/browser/extensions/subscribe_page_action_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698