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

Side by Side Diff: components/test_runner/tracked_dictionary.h

Issue 1829253002: Replicate to all renderers the accepted languages set by a layout test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@splitting-web-frame-test-client
Patch Set: Quit early if the value doesn't really change. Created 4 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_TEST_RUNNER_TRACKED_DICTIONARY_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_TRACKED_DICTIONARY_H_
6 #define COMPONENTS_TEST_RUNNER_TRACKED_DICTIONARY_H_ 6 #define COMPONENTS_TEST_RUNNER_TRACKED_DICTIONARY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 26 matching lines...) Expand all
37 37
38 // Overwrites |current_values| with values present in |new_changes|. 38 // Overwrites |current_values| with values present in |new_changes|.
39 // The new values are not present in |changed_values| afterwards. 39 // The new values are not present in |changed_values| afterwards.
40 void ApplyUntrackedChanges(const base::DictionaryValue& new_changes); 40 void ApplyUntrackedChanges(const base::DictionaryValue& new_changes);
41 41
42 // Sets a value in |current_values| and tracks the change in |changed_values|. 42 // Sets a value in |current_values| and tracks the change in |changed_values|.
43 void Set(const std::string& path, scoped_ptr<base::Value> new_value); 43 void Set(const std::string& path, scoped_ptr<base::Value> new_value);
44 44
45 // Type-specific setter for convenience. 45 // Type-specific setter for convenience.
46 void SetBoolean(const std::string& path, bool new_value); 46 void SetBoolean(const std::string& path, bool new_value);
47 void SetString(const std::string& path, const std::string& new_value);
47 48
48 private: 49 private:
49 base::DictionaryValue current_values_; 50 base::DictionaryValue current_values_;
50 base::DictionaryValue changed_values_; 51 base::DictionaryValue changed_values_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(TrackedDictionary); 53 DISALLOW_COPY_AND_ASSIGN(TrackedDictionary);
53 }; 54 };
54 55
55 } // namespace test_runner 56 } // namespace test_runner
56 57
57 #endif // COMPONENTS_TEST_RUNNER_TRACKED_DICTIONARY_H_ 58 #endif // COMPONENTS_TEST_RUNNER_TRACKED_DICTIONARY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698