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

Side by Side Diff: chrome/browser/extensions/api/browsing_data/browsing_data_test.cc

Issue 16915006: Convert most of extensions and some other random stuff to using the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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) 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 <string> 5 #include <string>
6 6
7 #include "base/json/json_string_value_serializer.h" 7 #include "base/json/json_string_value_serializer.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const content::NotificationDetails& details) OVERRIDE { 70 const content::NotificationDetails& details) OVERRIDE {
71 DCHECK_EQ(type, chrome::NOTIFICATION_BROWSING_DATA_REMOVED); 71 DCHECK_EQ(type, chrome::NOTIFICATION_BROWSING_DATA_REMOVED);
72 72
73 // We're not taking ownership of the details object, but storing a copy of 73 // We're not taking ownership of the details object, but storing a copy of
74 // it locally. 74 // it locally.
75 called_with_details_.reset(new BrowsingDataRemover::NotificationDetails( 75 called_with_details_.reset(new BrowsingDataRemover::NotificationDetails(
76 *content::Details<BrowsingDataRemover::NotificationDetails>( 76 *content::Details<BrowsingDataRemover::NotificationDetails>(
77 details).ptr())); 77 details).ptr()));
78 } 78 }
79 79
80 int GetAsMask(const DictionaryValue* dict, std::string path, int mask_value) { 80 int GetAsMask(const base::DictionaryValue* dict, std::string path,
81 int mask_value) {
81 bool result; 82 bool result;
82 EXPECT_TRUE(dict->GetBoolean(path, &result)) << "for " << path; 83 EXPECT_TRUE(dict->GetBoolean(path, &result)) << "for " << path;
83 return result ? mask_value : 0; 84 return result ? mask_value : 0;
84 } 85 }
85 86
86 void RunRemoveBrowsingDataFunctionAndCompareRemovalMask( 87 void RunRemoveBrowsingDataFunctionAndCompareRemovalMask(
87 const std::string& data_types, 88 const std::string& data_types,
88 int expected_mask) { 89 int expected_mask) {
89 scoped_refptr<RemoveBrowsingDataFunction> function = 90 scoped_refptr<RemoveBrowsingDataFunction> function =
90 new RemoveBrowsingDataFunction(); 91 new RemoveBrowsingDataFunction();
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 518
518 SetPrefsAndVerifySettings( 519 SetPrefsAndVerifySettings(
519 BrowsingDataRemover::REMOVE_COOKIES | 520 BrowsingDataRemover::REMOVE_COOKIES |
520 BrowsingDataRemover::REMOVE_HISTORY | 521 BrowsingDataRemover::REMOVE_HISTORY |
521 BrowsingDataRemover::REMOVE_DOWNLOADS, 522 BrowsingDataRemover::REMOVE_DOWNLOADS,
522 UNPROTECTED_WEB, 523 UNPROTECTED_WEB,
523 site_data_no_plugins | 524 site_data_no_plugins |
524 BrowsingDataRemover::REMOVE_HISTORY | 525 BrowsingDataRemover::REMOVE_HISTORY |
525 BrowsingDataRemover::REMOVE_DOWNLOADS); 526 BrowsingDataRemover::REMOVE_DOWNLOADS);
526 } 527 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698