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

Side by Side Diff: chrome/browser/extensions/extension_history_api.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_history_api.h" 5 #include "chrome/browser/extensions/extension_history_api.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 std::string json_args; 136 std::string json_args;
137 base::JSONWriter::Write(&args, false, &json_args); 137 base::JSONWriter::Write(&args, false, &json_args);
138 DispatchEvent(profile, keys::kOnVisitRemoved, json_args); 138 DispatchEvent(profile, keys::kOnVisitRemoved, json_args);
139 } 139 }
140 140
141 void ExtensionHistoryEventRouter::DispatchEvent(Profile* profile, 141 void ExtensionHistoryEventRouter::DispatchEvent(Profile* profile,
142 const char* event_name, 142 const char* event_name,
143 const std::string& json_args) { 143 const std::string& json_args) {
144 if (profile && profile->GetExtensionMessageService()) { 144 if (profile && profile->GetExtensionMessageService()) {
145 profile->GetExtensionMessageService()->DispatchEventToRenderers( 145 profile->GetExtensionMessageService()->DispatchEventToRenderers(
146 event_name, json_args, profile->IsOffTheRecord(), GURL()); 146 event_name, json_args, profile, GURL());
147 } 147 }
148 } 148 }
149 149
150 void HistoryFunction::Run() { 150 void HistoryFunction::Run() {
151 if (!RunImpl()) { 151 if (!RunImpl()) {
152 SendResponse(false); 152 SendResponse(false);
153 } 153 }
154 } 154 }
155 155
156 bool HistoryFunction::GetUrlFromValue(Value* value, GURL* url) { 156 bool HistoryFunction::GetUrlFromValue(Value* value, GURL* url) {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 base::Time::Now(), // To the current time. 366 base::Time::Now(), // To the current time.
367 &cancelable_consumer_, 367 &cancelable_consumer_,
368 NewCallback(this, &DeleteAllHistoryFunction::DeleteComplete)); 368 NewCallback(this, &DeleteAllHistoryFunction::DeleteComplete));
369 369
370 return true; 370 return true;
371 } 371 }
372 372
373 void DeleteAllHistoryFunction::DeleteComplete() { 373 void DeleteAllHistoryFunction::DeleteComplete() {
374 SendAsyncResponse(); 374 SendAsyncResponse();
375 } 375 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.cc ('k') | chrome/browser/extensions/extension_idle_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698