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

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

Issue 11824004: Do not pass URLs in onUpdated events to extensions unless they have the (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update test Created 7 years, 11 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) 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/menu_manager.h" 5 #include "chrome/browser/extensions/menu_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 637
638 properties->SetBoolean("editable", params.is_editable); 638 properties->SetBoolean("editable", params.is_editable);
639 639
640 args->Append(properties); 640 args->Append(properties);
641 641
642 // Add the tab info to the argument list. 642 // Add the tab info to the argument list.
643 // No tab info in a platform app. 643 // No tab info in a platform app.
644 if (!extension || !extension->is_platform_app()) { 644 if (!extension || !extension->is_platform_app()) {
645 // Note: web_contents are NULL in unit tests :( 645 // Note: web_contents are NULL in unit tests :(
646 if (web_contents) { 646 if (web_contents) {
647 args->Append(ExtensionTabUtil::CreateTabValue( 647 args->Append(ExtensionTabUtil::CreateTabValue(web_contents));
648 web_contents, ExtensionTabUtil::INCLUDE_PRIVACY_SENSITIVE_FIELDS));
649 } else { 648 } else {
650 args->Append(new DictionaryValue()); 649 args->Append(new DictionaryValue());
651 } 650 }
652 } 651 }
653 652
654 if (item->type() == MenuItem::CHECKBOX || 653 if (item->type() == MenuItem::CHECKBOX ||
655 item->type() == MenuItem::RADIO) { 654 item->type() == MenuItem::RADIO) {
656 bool was_checked = item->checked(); 655 bool was_checked = item->checked();
657 properties->SetBoolean("wasChecked", was_checked); 656 properties->SetBoolean("wasChecked", was_checked);
658 657
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 if (uid < other.uid) 865 if (uid < other.uid)
867 return true; 866 return true;
868 if (uid == other.uid) 867 if (uid == other.uid)
869 return string_uid < other.string_uid; 868 return string_uid < other.string_uid;
870 } 869 }
871 } 870 }
872 return false; 871 return false;
873 } 872 }
874 873
875 } // namespace extensions 874 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698