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

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

Issue 10824033: Coverity: Fix several pass-by-values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win build fix. Created 8 years, 5 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
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.h ('k') | chrome/common/extensions/url_pattern.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/themes/browser_theme_pack.h" 5 #include "chrome/browser/themes/browser_theme_pack.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 &pack->prepared_images_); 370 &pack->prepared_images_);
371 371
372 pack->GenerateTabBackgroundImages(&pack->prepared_images_); 372 pack->GenerateTabBackgroundImages(&pack->prepared_images_);
373 373
374 // The BrowserThemePack is now in a consistent state. 374 // The BrowserThemePack is now in a consistent state.
375 return pack; 375 return pack;
376 } 376 }
377 377
378 // static 378 // static
379 scoped_refptr<BrowserThemePack> BrowserThemePack::BuildFromDataPack( 379 scoped_refptr<BrowserThemePack> BrowserThemePack::BuildFromDataPack(
380 FilePath path, const std::string& expected_id) { 380 const FilePath& path, const std::string& expected_id) {
381 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 381 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
382 // Allow IO on UI thread due to deep-seated theme design issues. 382 // Allow IO on UI thread due to deep-seated theme design issues.
383 // (see http://crbug.com/80206) 383 // (see http://crbug.com/80206)
384 base::ThreadRestrictions::ScopedAllowIO allow_io; 384 base::ThreadRestrictions::ScopedAllowIO allow_io;
385 scoped_refptr<BrowserThemePack> pack(new BrowserThemePack); 385 scoped_refptr<BrowserThemePack> pack(new BrowserThemePack);
386 pack->data_pack_.reset( 386 pack->data_pack_.reset(
387 new ui::DataPack(ui::SCALE_FACTOR_100P)); 387 new ui::DataPack(ui::SCALE_FACTOR_100P));
388 388
389 if (!pack->data_pack_->LoadFromPath(path)) { 389 if (!pack->data_pack_->LoadFromPath(path)) {
390 LOG(ERROR) << "Failed to load theme data pack."; 390 LOG(ERROR) << "Failed to load theme data pack.";
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 hsl.h = tints_[i].h; 1078 hsl.h = tints_[i].h;
1079 hsl.s = tints_[i].s; 1079 hsl.s = tints_[i].s;
1080 hsl.l = tints_[i].l; 1080 hsl.l = tints_[i].l;
1081 return hsl; 1081 return hsl;
1082 } 1082 }
1083 } 1083 }
1084 } 1084 }
1085 1085
1086 return ThemeService::GetDefaultTint(id); 1086 return ThemeService::GetDefaultTint(id);
1087 } 1087 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.h ('k') | chrome/common/extensions/url_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698