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

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

Issue 3058044: Revert 54955 - Merge 54514 ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/479/src/
Patch Set: Created 10 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_test_api.h" 5 #include "chrome/browser/extensions/extension_test_api.h"
6 6
7 #include <string>
8
9 #include "chrome/browser/browser.h" 7 #include "chrome/browser/browser.h"
10 #include "chrome/browser/profile.h" 8 #include "chrome/browser/profile.h"
11 #include "chrome/browser/extensions/extensions_service.h" 9 #include "chrome/browser/extensions/extensions_service.h"
12 #include "chrome/browser/extensions/extensions_quota_service.h" 10 #include "chrome/browser/extensions/extensions_quota_service.h"
13 #include "chrome/common/notification_service.h" 11 #include "chrome/common/notification_service.h"
14 12
15 bool ExtensionTestPassFunction::RunImpl() { 13 bool ExtensionTestPassFunction::RunImpl() {
16 NotificationService::current()->Notify( 14 NotificationService::current()->Notify(
17 NotificationType::EXTENSION_TEST_PASSED, 15 NotificationType::EXTENSION_TEST_PASSED,
18 Source<Profile>(dispatcher()->profile()), 16 Source<Profile>(dispatcher()->profile()),
(...skipping 26 matching lines...) Expand all
45 quota->violators_.clear(); 43 quota->violators_.clear();
46 return true; 44 return true;
47 } 45 }
48 46
49 bool ExtensionTestCreateIncognitoTabFunction::RunImpl() { 47 bool ExtensionTestCreateIncognitoTabFunction::RunImpl() {
50 std::string url; 48 std::string url;
51 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url)); 49 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url));
52 Browser::OpenURLOffTheRecord(profile(), GURL(url)); 50 Browser::OpenURLOffTheRecord(profile(), GURL(url));
53 return true; 51 return true;
54 } 52 }
55
56 bool ExtensionTestSendMessageFunction::RunImpl() {
57 std::string message;
58 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &message));
59 std::string id = extension_id();
60 NotificationService::current()->Notify(
61 NotificationType::EXTENSION_TEST_MESSAGE,
62 Source<std::string>(&id),
63 Details<std::string>(&message));
64 return true;
65 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_test_api.h ('k') | chrome/browser/extensions/extension_test_message_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698