OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/external_pref_extension_loader.h" | 5 #include "chrome/browser/extensions/external_pref_extension_loader.h" |
6 | 6 |
7 #include "app/app_paths.h" | 7 #include "app/app_paths.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 ExternalTestingExtensionLoader::ExternalTestingExtensionLoader( | 70 ExternalTestingExtensionLoader::ExternalTestingExtensionLoader( |
71 const std::string& json_data) { | 71 const std::string& json_data) { |
72 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 72 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
73 JSONStringValueSerializer serializer(json_data); | 73 JSONStringValueSerializer serializer(json_data); |
74 testing_prefs_.reset(ExtractPrefs(&serializer)); | 74 testing_prefs_.reset(ExtractPrefs(&serializer)); |
75 } | 75 } |
76 | 76 |
77 void ExternalTestingExtensionLoader::StartLoading() { | 77 void ExternalTestingExtensionLoader::StartLoading() { |
78 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 78 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
79 prefs_.reset( | 79 prefs_.reset(testing_prefs_->DeepCopy()); |
80 static_cast<DictionaryValue*>(testing_prefs_->DeepCopy())); | |
81 LoadFinished(); | 80 LoadFinished(); |
82 } | 81 } |
OLD | NEW |