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

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

Issue 3210007: Add support for a "split" incognito behavior for extensions. (Closed)
Patch Set: latest Created 10 years, 3 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/extension_bookmarks_module.h" 5 #include "chrome/browser/extensions/extension_bookmarks_module.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 model->AddObserver(this); 90 model->AddObserver(this);
91 models_.insert(model); 91 models_.insert(model);
92 } 92 }
93 } 93 }
94 94
95 void ExtensionBookmarkEventRouter::DispatchEvent(Profile *profile, 95 void ExtensionBookmarkEventRouter::DispatchEvent(Profile *profile,
96 const char* event_name, 96 const char* event_name,
97 const std::string json_args) { 97 const std::string json_args) {
98 if (profile->GetExtensionMessageService()) { 98 if (profile->GetExtensionMessageService()) {
99 profile->GetExtensionMessageService()->DispatchEventToRenderers( 99 profile->GetExtensionMessageService()->DispatchEventToRenderers(
100 event_name, json_args, profile->IsOffTheRecord(), GURL()); 100 event_name, json_args, profile, GURL());
101 } 101 }
102 } 102 }
103 103
104 void ExtensionBookmarkEventRouter::Loaded(BookmarkModel* model) { 104 void ExtensionBookmarkEventRouter::Loaded(BookmarkModel* model) {
105 // TODO(erikkay): Perhaps we should send this event down to the extension 105 // TODO(erikkay): Perhaps we should send this event down to the extension
106 // so they know when it's safe to use the API? 106 // so they know when it's safe to use the API?
107 } 107 }
108 108
109 void ExtensionBookmarkEventRouter::BookmarkNodeMoved( 109 void ExtensionBookmarkEventRouter::BookmarkNodeMoved(
110 BookmarkModel* model, 110 BookmarkModel* model,
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE); 818 SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE);
819 return true; 819 return true;
820 } 820 }
821 821
822 void ExportBookmarksFunction::FileSelected(const FilePath& path, 822 void ExportBookmarksFunction::FileSelected(const FilePath& path,
823 int index, 823 int index,
824 void* params) { 824 void* params) {
825 bookmark_html_writer::WriteBookmarks(profile(), path, NULL); 825 bookmark_html_writer::WriteBookmarks(profile(), path, NULL);
826 Release(); // Balanced in BookmarksIOFunction::SelectFile() 826 Release(); // Balanced in BookmarksIOFunction::SelectFile()
827 } 827 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698