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

Side by Side Diff: chrome/browser/themes/browser_theme_pack.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/themes/browser_theme_pack.h" 5 #include "chrome/browser/themes/browser_theme_pack.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/data_pack.h" 8 #include "base/data_pack.h"
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 pack->GenerateTabBackgroundImages(&pack->prepared_images_); 361 pack->GenerateTabBackgroundImages(&pack->prepared_images_);
362 362
363 // The BrowserThemePack is now in a consistent state. 363 // The BrowserThemePack is now in a consistent state.
364 return pack; 364 return pack;
365 } 365 }
366 366
367 // static 367 // static
368 scoped_refptr<BrowserThemePack> BrowserThemePack::BuildFromDataPack( 368 scoped_refptr<BrowserThemePack> BrowserThemePack::BuildFromDataPack(
369 FilePath path, const std::string& expected_id) { 369 FilePath path, const std::string& expected_id) {
370 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 370 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
371 scoped_refptr<BrowserThemePack> pack = new BrowserThemePack; 371 scoped_refptr<BrowserThemePack> pack(new BrowserThemePack);
372 pack->data_pack_.reset(new base::DataPack); 372 pack->data_pack_.reset(new base::DataPack);
373 373
374 if (!pack->data_pack_->Load(path)) { 374 if (!pack->data_pack_->Load(path)) {
375 LOG(ERROR) << "Failed to load theme data pack."; 375 LOG(ERROR) << "Failed to load theme data pack.";
376 return NULL; 376 return NULL;
377 } 377 }
378 378
379 base::StringPiece pointer; 379 base::StringPiece pointer;
380 if (!pack->data_pack_->GetStringPiece(kHeaderID, &pointer)) 380 if (!pack->data_pack_->GetStringPiece(kHeaderID, &pointer))
381 return NULL; 381 return NULL;
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 hsl.h = tints_[i].h; 1036 hsl.h = tints_[i].h;
1037 hsl.s = tints_[i].s; 1037 hsl.s = tints_[i].s;
1038 hsl.l = tints_[i].l; 1038 hsl.l = tints_[i].l;
1039 return hsl; 1039 return hsl;
1040 } 1040 }
1041 } 1041 }
1042 } 1042 }
1043 1043
1044 return BrowserThemeProvider::GetDefaultTint(id); 1044 return BrowserThemeProvider::GetDefaultTint(id);
1045 } 1045 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_typed_url_unittest.cc ('k') | chrome/browser/themes/browser_theme_pack_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698