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

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

Issue 6324004: Made return types of various Value::DeepCopy() implementations more specific (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test for covariant return types Created 9 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 | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/extensions/sandboxed_extension_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698