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

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

Issue 7610003: More. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Implements the Chrome Extensions Cookies API. 5 // Implements the Chrome Extensions Cookies API.
6 6
7 #include "chrome/browser/extensions/extension_cookies_api.h" 7 #include "chrome/browser/extensions/extension_cookies_api.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 17 matching lines...) Expand all
28 28
29 ExtensionCookiesEventRouter::ExtensionCookiesEventRouter(Profile* profile) 29 ExtensionCookiesEventRouter::ExtensionCookiesEventRouter(Profile* profile)
30 : profile_(profile) {} 30 : profile_(profile) {}
31 31
32 ExtensionCookiesEventRouter::~ExtensionCookiesEventRouter() {} 32 ExtensionCookiesEventRouter::~ExtensionCookiesEventRouter() {}
33 33
34 void ExtensionCookiesEventRouter::Init() { 34 void ExtensionCookiesEventRouter::Init() {
35 CHECK(registrar_.IsEmpty()); 35 CHECK(registrar_.IsEmpty());
36 registrar_.Add(this, 36 registrar_.Add(this,
37 chrome::NOTIFICATION_COOKIE_CHANGED, 37 chrome::NOTIFICATION_COOKIE_CHANGED,
38 NotificationService::AllSources()); 38 NotificationService::AllBrowserContextsAndSources());
39 } 39 }
40 40
41 void ExtensionCookiesEventRouter::Observe(int type, 41 void ExtensionCookiesEventRouter::Observe(int type,
42 const NotificationSource& source, 42 const NotificationSource& source,
43 const NotificationDetails& details) { 43 const NotificationDetails& details) {
44 Profile* profile = Source<Profile>(source).ptr(); 44 Profile* profile = Source<Profile>(source).ptr();
45 if (!profile_->IsSameProfile(profile)) { 45 if (!profile_->IsSameProfile(profile)) {
46 return; 46 return;
47 } 47 }
48 switch (type) { 48 switch (type) {
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 extension_cookies_helpers::CreateCookieStoreValue( 532 extension_cookies_helpers::CreateCookieStoreValue(
533 incognito_profile, incognito_tab_ids.release())); 533 incognito_profile, incognito_tab_ids.release()));
534 } 534 }
535 result_.reset(cookie_store_list); 535 result_.reset(cookie_store_list);
536 return true; 536 return true;
537 } 537 }
538 538
539 void GetAllCookieStoresFunction::Run() { 539 void GetAllCookieStoresFunction::Run() {
540 SendResponse(RunImpl()); 540 SendResponse(RunImpl());
541 } 541 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698